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

chore: get update-gyp.py to work with Python >= v3.5 #2826

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

rzhao271
Copy link
Contributor

@rzhao271 rzhao271 commented Apr 6, 2023

Checklist
  • npm install && npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

numeric_owner is a keyword-only argument in Python v3.9. When I try running the script without the change, Python gives me the following error:

Unzipping...
Traceback (most recent call last):
  File "C:\Users\raymondzhao\work\node-gyp\update-gyp.py", line 54, in <module>
    safe_extract(tar_ref, unzip_target)
  File "C:\Users\raymondzhao\work\node-gyp\update-gyp.py", line 52, in safe_extract
    tar.extractall(path, members, numeric_owner)
TypeError: extractall() takes from 1 to 3 positional arguments but 4 were given

@cclauss cclauss changed the title chore: get update-gyp.py to work with Python v3.9 chore: get update-gyp.py to work with Python >= v3.5 Apr 6, 2023
Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! numeric_owner was added as a keyword-only argument tar.extractall() in Python 3.5.

@cclauss cclauss merged commit 337e8e6 into nodejs:main Apr 6, 2023
@rzhao271 rzhao271 deleted the rzhao271/fix-update-script branch April 6, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants