fediverse-devnet / feditest

A testing framework for distributed, heterogeneous systems communicating with complex protocols, such as the Fediverse
https://feditest.org/
MIT License
32 stars 6 forks source link

Unable to run feditest with Python 3.10 #199

Open mexon opened 3 months ago

mexon commented 3 months ago

I'm using Ubuntu LTS 22.04, which has Python 3.10.12. Admittedly this is a couple of years old, but it's still a couple of months away from nagging me to upgrade, and is supported until 2027. It's commonly used as a stable platform for the type of servers being tested, so for localhost tests it would be nice if this worked out of the box.

(.venv) mat@aeon:~/Project/feditest-tests-fedivers-2$ python3 -m pip install feditest
ERROR: Ignored the following versions that require a different python version: 0.0.2 Requires-Python >=3.11; 0.2 Requires-Python >=3.11
ERROR: Could not find a version that satisfies the requirement feditest (from versions: none)
ERROR: No matching distribution found for feditest
jernst commented 2 months ago

We can consider this once we get to a 1.0 release. In the meantime, we need to focus on features.

jernst commented 2 months ago

@mexon could you try to run it with your python version and report whether there are actually any compatibility problems?

mexon commented 2 months ago

I submitted #236 and #237 as attempts to get this working. But it still fails with many errors like:


    @pytest.fixture(scope="session")
    def node():
        cwd = os.path.dirname(__file__)
>       with open(os.path.join(cwd, "mastodon_parameters.json")) as fp:
E       FileNotFoundError: [Errno 2] No such file or directory: '/home/mat/Project/feditest/tests/mastodon_parameters.json'

tests/test_mastodon_node.py:39: FileNotFoundError

That's all I have time for this morning, I might look again later.

mexon commented 2 months ago

The instructions for setting up a JSON file are in the python code, so I followed that. However, it still fails with a SSL issue. My best theory there is that it doesn't like me using my own CA for my test instances. I don't have a "real" Mastodon instance to test against. Anyway, I think probably the PRs I've already submitted are all that's needed to restore compatibility with Python 3.10.