[Python-checkins] peps: PEP-0427: clarify some implementation details.

daniel.holth python-checkins at python.org
Mon Feb 25 03:41:56 CET 2013


http://hg.python.org/peps/rev/7d2494f4cd0a
changeset:   4772:7d2494f4cd0a
user:        Daniel Holth <dholth at fastmail.fm>
date:        Sun Feb 24 21:41:40 2013 -0500
summary:
  PEP-0427: clarify some implementation details.

Hope it's OK to clarify two details that came up during Vinay's distlib wheel
implementation: zip directory filenames are encoded as utf-8, and it's nicer
to put the .dist-info directory at the end of the archive.

files:
  pep-0427.txt |  20 +++++++++++++++++---
  1 files changed, 17 insertions(+), 3 deletions(-)


diff --git a/pep-0427.txt b/pep-0427.txt
--- a/pep-0427.txt
+++ b/pep-0427.txt
@@ -101,6 +101,15 @@
     accompanying .exe wrappers.  Windows installers may want to add them
     during install.
 
+Recommended archiver features
+'''''''''''''''''''''''''''''
+
+Place ``.dist-info`` at the end of the archive.
+    Archivers are encouraged to place the ``.dist-info`` files physically
+    at the end of the archive.  This enables some potentially interesting
+    ZIP tricks including the ability to amend the metadata without
+    rewriting the entire archive.
+
 
 File Format
 -----------
@@ -149,9 +158,14 @@
 
     re.sub("[^\w\d.]+", "_", distribution, re.UNICODE)
 
-The filename is Unicode.  It will be some time before the tools are
-updated to support non-ASCII filenames, but they are supported in this
-specification.
+The archive filename is Unicode.  It will be some time before the tools
+are updated to support non-ASCII filenames, but they are supported in
+this specification.
+
+The filenames *inside* the archive are encoded as UTF-8.  Although some
+ZIP clients in common use do not properly display UTF-8 filenames,
+the encoding is supported by both the ZIP specification and Python's
+``zipfile``.
 
 File contents
 '''''''''''''

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list