Subject: AttributeError: 'PosixPath' object has no attribute 'read_text'

From: [email-masked]
Date: Tue, 20 Apr 2021 20:29:23 +0000

Greetings, in the last update some python packages were broken, such as docker-compose, giving the
following error:

Traceback (most recent call last):
  File "/gnu/store/rnbsmwmk06kxn899ckvy4pprvg9ypsrs-docker-compose-1.25.4/bin/.docker-compose-real", line 11, in <module>
    load_entry_point('docker-compose==1.25.4', 'console_scripts', 'docker-compose')()
  File "/gnu/store/v1l6cm8aa47zsxvjjmzd5rpdbbslzpc8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/gnu/store/v1l6cm8aa47zsxvjjmzd5rpdbbslzpc8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/gnu/store/v1l6cm8aa47zsxvjjmzd5rpdbbslzpc8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/gnu/store/v1l6cm8aa47zsxvjjmzd5rpdbbslzpc8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/gnu/store/rnbsmwmk06kxn899ckvy4pprvg9ypsrs-docker-compose-1.25.4/lib/python3.8/site-packages/compose/cli/main.py", line 24, in <module>
    from ..config import ConfigurationError
  File "/gnu/store/rnbsmwmk06kxn899ckvy4pprvg9ypsrs-docker-compose-1.25.4/lib/python3.8/site-packages/compose/config/__init__.py", line 6, in <module>
    from .config import ConfigurationError
  File "/gnu/store/rnbsmwmk06kxn899ckvy4pprvg9ypsrs-docker-compose-1.25.4/lib/python3.8/site-packages/compose/config/config.py", line 51, in <module>
    from .validation import match_named_volumes
  File "/gnu/store/rnbsmwmk06kxn899ckvy4pprvg9ypsrs-docker-compose-1.25.4/lib/python3.8/site-packages/compose/config/validation.py", line 12, in <module>
    from jsonschema import Draft4Validator
  File "/gnu/store/v0i3hq0nmdzydfix8jvjl69367zaz0zz-python-jsonschema-3.2.0/lib/python3.8/site-packages/jsonschema/__init__.py", line 34, in <module>
    __version__ = metadata.version("jsonschema")
  File "/gnu/store/rqy4flv8v7mp9994bjh20amk1hfj9xvs-python-3.8.2/lib/python3.8/importlib/metadata.py", line 531, in version
    return distribution(distribution_name).version
  File "/gnu/store/rqy4flv8v7mp9994bjh20amk1hfj9xvs-python-3.8.2/lib/python3.8/importlib/metadata.py", line 236, in version
    return self.metadata['Version']
  File "/gnu/store/rqy4flv8v7mp9994bjh20amk1hfj9xvs-python-3.8.2/lib/python3.8/importlib/metadata.py", line 224, in metadata
    self.read_text('METADATA')
  File "/gnu/store/rqy4flv8v7mp9994bjh20amk1hfj9xvs-python-3.8.2/lib/python3.8/importlib/metadata.py", line 491, in read_text
    return self._path.joinpath(filename).read_text(encoding='utf-8')
AttributeError: 'PosixPath' object has no attribute 'read_text'

Thank you