Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"six.moves" error running any wpt command on Python 3.12 #42883

Closed
domenic opened this issue Nov 1, 2023 · 1 comment · Fixed by #43542
Closed

"six.moves" error running any wpt command on Python 3.12 #42883

domenic opened this issue Nov 1, 2023 · 1 comment · Fixed by #43542

Comments

@domenic
Copy link
Member

domenic commented Nov 1, 2023

Fresh Windows 11 computer, with Python 3.12.0 installed but not much else.

In PowerShell:

PS C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt> python wpt make-hosts-file | Out-File $env:SystemRoot\System32\drivers\etc\hosts -Encoding ascii -Append
Traceback (most recent call last):
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\wpt", line 10, in <module>
    wpt.main()
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\wpt\wpt.py", line 211, in main
    script, parser = import_command(prog, command, props)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\wpt\wpt.py", line 102, in import_command
    mod = __import__(mod_name)
          ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\ci\make_hosts_file.py", line 8, in <module>
    from ..serve.serve import build_config, make_hosts_file
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\serve\__init__.py", line 1, in <module>
    from . import serve  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\serve\serve.py", line 21, in <module>
    from html5lib import html5parser
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\third_party\html5lib\html5lib\__init__.py", line 25, in <module>
    from .html5parser import HTMLParser, parse, parseFragment
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\third_party\html5lib\html5lib\html5parser.py", line 6, in <module>
    from . import _inputstream
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\third_party\html5lib\html5lib\_inputstream.py", line 4, in <module>
    from six.moves import http_client, urllib
ModuleNotFoundError: No module named 'six.moves'

In Git Bash:

d@Domenic-White MINGW64 ~/OneDrive - domenic.me/Code/GitHub/web-platform-tests/wpt (details-open-parser)
$ ./wpt serve
Traceback (most recent call last):
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\wpt", line 10, in <module>
    wpt.main()
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\wpt\wpt.py", line 211, in main
    script, parser = import_command(prog, command, props)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\wpt\wpt.py", line 102, in import_command
    mod = __import__(mod_name)
          ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\serve\__init__.py", line 1, in <module>
    from . import serve  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\serve\serve.py", line 21, in <module>
    from html5lib import html5parser
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\third_party\html5lib\html5lib\__init__.py", line 25, in <module>
    from .html5parser import HTMLParser, parse, parseFragment
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\third_party\html5lib\html5lib\html5parser.py", line 6, in <module>
    from . import _inputstream
  File "C:\Users\d\OneDrive - domenic.me\Code\GitHub\web-platform-tests\wpt\tools\third_party\html5lib\html5lib\_inputstream.py", line 4, in <module>
    from six.moves import http_client, urllib
ModuleNotFoundError: No module named 'six.moves'

Do I have to do something to install six globally, or something? I didn't see anything in https://web-platform-tests.org/running-tests/from-local-system.html#system-setup .

C:\Users\d\AppData\Local\Programs\Python\Python312\Scripts\ and its parent directory are in my %PATH%.

@gsnedders
Copy link
Member

We vendor six 1.15, some of the backwards incompatible changes in Python 3.12 mean we need to upgrade our vendored copy to 1.16 (c.f. benjaminp/six#343 and benjaminp/six#352).

@gsnedders gsnedders changed the title "six.moves" error running any wpt command on fresh clone on fresh Windows "six.moves" error running any wpt command on Python 3.12 Nov 2, 2023
gsnedders pushed a commit that referenced this issue Dec 15, 2023
marcoscaceres pushed a commit that referenced this issue Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants