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

fetch dart fails for Python version 3.12.0 due to imp module #54306

Closed
galacticalex opened this issue Dec 11, 2023 · 2 comments
Closed

fetch dart fails for Python version 3.12.0 due to imp module #54306

galacticalex opened this issue Dec 11, 2023 · 2 comments
Labels
area-build Use area-build for SDK build issues.

Comments

@galacticalex
Copy link

Situation

I'm building the sdk on Fedora by following the wiki instructions (which, until now, was working well by the way).

But Fedora 39 packages Python 3.12.0 by default (Debian stable currently uses 3.11.2).

Problem

When running fetch dart the setup fails due to the use of the Python module imp which has been deprecated as of 3.12.0.

The file that caused the issue was tools/utils.py, but there are a few others which will cause the same issue (see attachment below).

Here is the console output of fetch dart failing: console_output.txt
And a grep of the repo for imp usage: grep_import_imp.txt

Fix

As a temporary fix, running fetch dart within a 3.11 virtual environment (created with python3.11 -m venv ...) resolves the issue.

A permanent fix is provided in the Python docs (see link above).

As you will run into this, I wanted to give you a heads-up.

Cheers

~ Alex

@galacticalex galacticalex changed the title fetch dart fails for Python version 3.12.0 due to **imp** module fetch dart fails for Python version 3.12.0 due to imp module Dec 11, 2023
@rmacnak-google rmacnak-google added the area-build Use area-build for SDK build issues. label Dec 11, 2023
@rmacnak-google
Copy link
Contributor

fetch comes from depot_tools, which uses the Chromium issue tracker. See https://bugs.chromium.org/p/chromium/issues/detail?id=1487454

copybara-service bot pushed a commit that referenced this issue Dec 12, 2023
Bug: #54306
Change-Id: I974e5e70c6c1cbb87343139a26052996d8df858f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341023
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
@athomas
Copy link
Member

athomas commented Jan 12, 2024

Fetching and building with python 3.12 works now. There are some remaining syntax warnings that will be fixed by https://dart-review.googlesource.com/c/sdk/+/346022.

@athomas athomas closed this as completed Jan 12, 2024
copybara-service bot pushed a commit that referenced this issue Jan 12, 2024
Bug: #54306
Change-Id: I3abfac0765721246b59451152d322a111d685644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346022
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-build Use area-build for SDK build issues.
Projects
None yet
Development

No branches or pull requests

3 participants