Skip to content

Can't run solver on psf/requests versions older than 0.14.2 #98

@apotterri

Description

@apotterri

Describe the bug

Prior to v0.14.2, psf/requests includes its own version of six. It did this bye adding its packages subdirectory at the beginning of sys.path, ensuring that subsequent imports of six will be loaded from packages.

Unfortunately, the version it includes conflicts with the version in python 3.9. Once the psf/requests version gets loaded, subsequence imports may fail.

For example, the attempt here tries to import the _thread module from six.moves. This fails with the packaged six module, resulting in this error:

...
  File "/usr/share/miniconda/envs/swe-bench/lib/python3.9/site-packages/dateutil/tz/tz.py", line 21, in <module>
    from six.moves import _thread
ImportError: cannot import name '_thread' from 'moves' (unknown location)

As of v0.14.2, packages was no longer being inserted at the beginning of sys.path.

Steps/Code to Reproduce

run the benchmark

Expected Results

don't fail

Actual Results

fail

System Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions