Opened 6 years ago

Closed 5 years ago

#30160 closed Cleanup/optimization (fixed)

Support more archive formats (e.g. .tar.xz) for app and project templates

Reported by: Nick Pope Owned by: Nick Pope
Component: Core (Management commands) Version: dev
Severity: Normal Keywords: startapp, startproject, lzma, xz
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Python 3.3 added support for lzma compression and lzma-compressed tarfiles.

In addition, there are other well-known extensions for some of the already supported compression formats that Django currently doesn't recognise:
http://www.gnu.org/software/tar/manual/html_node/gzip.html#auto_002dcompress

Change History (10)

comment:1 by Nick Pope, 6 years ago

Has patch: set

comment:2 by Tim Graham, 6 years ago

Summary: Support more archive formats for app and project templates.Support more archive formats (e.g. lmza) for app and project templates
Triage Stage: UnreviewedAccepted

comment:3 by Nick Pope, 6 years ago

Summary: Support more archive formats (e.g. lmza) for app and project templatesSupport more archive formats (e.g. .tar.xz) for app and project templates

comment:4 by Tim Graham, 6 years ago

Patch needs improvement: set

Removing from review queue as per Nick's comment on the PR, "please don't merge yet. I noticed shutil.unpack_archive() and want to investigate replacing django.utils.archive.

comment:5 by Nick Pope, 5 years ago

Patch needs improvement: unset

PR updated. Have abandoned looking at shutil.unpack_archive() for now as the current implementation does some fiddling related to permissions that is still required and cannot currently be worked around.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 0509148c:

Refs #30160 -- Made destination path a required argument of extract().

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 69a30f62:

Refs #30160 -- Simplified archive extension map and added other aliases.

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 1692f69e:

Refs #30160 -- Doc'd startapp/startproject support for tarfile templates.

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In c95d063:

Refs #30160 -- Simplified and improved tests for django.utils.archive.

The file executable should have 0o775 permission not only u=x.
The file no_permissions should have 0o644 u=r.

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In f618e033:

Fixed #30160 -- Added support for LZMA and XZ templates to startapp/startproject management commands.

Note: See TracTickets for help on using tickets.
Back to Top