Opened 3 years ago
Closed 3 years ago
#24830 closed defect (fixed)
port uncompress/tar_file.py to python3
Reported by: | dimpase | Owned by: | embray |
---|---|---|---|
Priority: | blocker | Milestone: | sage-8.2 |
Component: | python3 | Keywords: | |
Cc: | vbraun, embray, chapoton | Merged in: | |
Authors: | Erik Bray | Reviewers: | Dima Pasechnik |
Report Upstream: | N/A | Work issues: | |
Branch: | d6e32e2 (Commits) | Commit: | d6e32e2e89e301e2fcf741eaa2c141c4170cffa3 |
Dependencies: | Stopgaps: |
Description
the internals of python's tarfile.py have changed, and the override of _extract_member
in uncompress/tar_file.py
misses parameters. Namely, if your system python is python3, you will get
Setting up build directory for patch-2.7.5 Traceback (most recent call last): File "/mnt/opt/Sage/sage-clang/build/bin/sage-uncompress-spkg", line 23, in <module> run() File "/mnt/opt/Sage/sage-clang/build/bin/../sage_bootstrap/uncompress/cmdline.py", line 72, in run unpack_archive(archive, dirname) File "/mnt/opt/Sage/sage-clang/build/bin/../sage_bootstrap/uncompress/action.py", line 68, in unpack_archive archive.extractall(members=archive.names) File "/mnt/opt/Sage/sage-clang/build/bin/../sage_bootstrap/uncompress/tar_file.py", line 90, in extractall members=members) File "/usr/lib64/python3.5/tarfile.py", line 1998, in extractall numeric_owner=numeric_owner) File "/usr/lib64/python3.5/tarfile.py", line 2040, in extract numeric_owner=numeric_owner) TypeError: _extract_member() got an unexpected keyword argument 'set_attrs'
as soon as you start a clean build of Sage.
Change History (14)
comment:1 Changed 3 years ago by
comment:2 Changed 3 years ago by
I don't think I've tried building Sage with Python 3 as the default "bootstrap" Python, but indeed that should definitely work, especially as more distros are finally defaulting to Python 3.
Is this the only issue you've encountered so far?
comment:3 Changed 3 years ago by
- Owner changed from (none) to embray
comment:4 Changed 3 years ago by
This is the first bug one hits, I didn't go further. I suppose that merely adding the extra (Python3-only) key arguments to the functions overriding the ones in the library will do here (as key args are optional, and so more is OK for Python2 as well).
comment:5 Changed 3 years ago by
- Priority changed from major to blocker
From the sound of things this is a regression too, since it used to work on Python 3 but now it doesn't.
comment:6 Changed 3 years ago by
- Type changed from enhancement to defect
comment:7 Changed 3 years ago by
- Branch set to u/embray/python3/ticket-24830
- Commit set to d6e32e2e89e301e2fcf741eaa2c141c4170cffa3
- Status changed from new to needs_review
New commits:
d6e32e2 | Fix compatibility with newer versions of the tarfile module in Python 3
|
comment:8 Changed 3 years ago by
missing blank lines after .. note::
twice
comment:9 Changed 3 years ago by
Okay, but that isn't strictly needed by RST I don't think.
comment:10 Changed 3 years ago by
sorry for the bikesheding. I would be happy to give a positive review, but I would prefer if Dima tests if it works.
This seems to have hurt somebody : https://groups.google.com/forum/#!topic/sage-support/UmGFtjcnm6Y
comment:11 Changed 3 years ago by
Yeah, I've already talked to Viviane about it.
comment:12 Changed 3 years ago by
Did she try the branch here ?
comment:13 Changed 3 years ago by
- Reviewers set to Dima Pasechnik
- Status changed from needs_review to positive_review
works, and docs build
comment:14 Changed 3 years ago by
- Branch changed from u/embray/python3/ticket-24830 to d6e32e2e89e301e2fcf741eaa2c141c4170cffa3
- Resolution set to fixed
- Status changed from positive_review to closed
while I am at it: