From 09a2b9be24b603d3aa42d21d02ddc53ee21ef493 Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Mon, 20 Nov 2023 14:29:13 -0300 Subject: [PATCH] Document required Python version The error I was getting is > AttributeError: module 'collections' has no attribute 'MutableSet' Googled the error, sounded like it might be related to [1]. Downgrading Python to version used here worked. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1791952 --- .tool-versions | 1 + README.md | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/.tool-versions b/.tool-versions index 8721cf9..97bb9c3 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,3 @@ nodejs 8.17.0 ruby 2.6.4 +python 3.8.18 diff --git a/README.md b/README.md index 0f2e6d4..8af8da7 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ Returns a `Uint8Array`, the 'target', being the result of applying `delta` to `s ### Requirements +#### Node.js + The `vcdiff` dev dependency of this project, used for testing, fails to build against [Node.js 9](https://nodejs.org/download/release/latest-v9.x/) and newer. For this reason, until [#3](https://github.com/ably-forks/vcdiff-decoder/issues/3) has been addressed, the tests must be run against an environment with [Node.js 8](https://nodejs.org/download/release/latest-v8.x/) installed. @@ -94,6 +96,16 @@ or compatible tooling to manage their Node.js runtime versions, we have included [`.tool-versions`](.tool-versions) file. +#### Python + +The version of `node-gyp` bundled with the above-mentioned version of NPM uses an API that was removed in Python 3.9, causing `npm install` to fail. So, you must use Python 3.8 or earlier. + +For those who use +[ASDF](https://github.com/asdf-vm/asdf) +or compatible tooling to manage their Python runtime versions, we have included a +[`.tool-versions`](.tool-versions) +file. + ### Building You can trigger a build using Webpack with: