@@ -229,7 +229,11 @@ details.
229229
230230.. data :: DEFAULT_FORMAT
231231
232- The default format for creating archives. This is currently :const: `GNU_FORMAT `.
232+ The default format for creating archives. This is currently :const: `PAX_FORMAT `.
233+
234+ .. versionchanged :: 3.8
235+ The default format for new archives was changed to
236+ :const: `PAX_FORMAT ` from :const: `GNU_FORMAT `.
233237
234238
235239.. seealso ::
@@ -820,8 +824,10 @@ There are three tar formats that can be created with the :mod:`tarfile` module:
820824
821825* The POSIX.1-2001 pax format (:const: `PAX_FORMAT `). It is the most flexible
822826 format with virtually no limits. It supports long filenames and linknames, large
823- files and stores pathnames in a portable way. However, not all tar
824- implementations today are able to handle pax archives properly.
827+ files and stores pathnames in a portable way. Modern tar implementations,
828+ including GNU tar, bsdtar/libarchive and star, fully support extended *pax *
829+ features; some older or unmaintained libraries may not, but should treat
830+ *pax * archives as if they were in the universally-supported *ustar * format.
825831
826832 The *pax * format is an extension to the existing *ustar * format. It uses extra
827833 headers for information that cannot be stored otherwise. There are two flavours
@@ -871,7 +877,7 @@ converted. Possible values are listed in section :ref:`error-handlers`.
871877The default scheme is ``'surrogateescape' `` which Python also uses for its
872878file system calls, see :ref: `os-filenames `.
873879
874- In case of :const: `PAX_FORMAT ` archives, *encoding * is generally not needed
880+ For :const: `PAX_FORMAT ` archives (the default) , *encoding * is generally not needed
875881because all the metadata is stored using *UTF-8 *. *encoding * is only used in
876882the rare cases when binary pax headers are decoded or when strings with
877883surrogate characters are stored.
0 commit comments