diff -r 4e22d9c58ac4 Doc/howto/unicode.rst --- a/Doc/howto/unicode.rst Tue Feb 12 14:31:06 2013 +0100 +++ b/Doc/howto/unicode.rst Tue Feb 12 16:45:30 2013 +0200 @@ -456,11 +456,11 @@ One problem is the multi-byte nature of encodings; one Unicode character can be represented by several bytes. If you want to read the file in arbitrary-sized -chunks (say, 1k or 4k), you need to write error-handling code to catch the case +chunks (say, 1KiB or 4KiB), you need to write error-handling code to catch the case where only part of the bytes encoding a single Unicode character are read at the end of a chunk. One solution would be to read the entire file into memory and then perform the decoding, but that prevents you from working with files that -are extremely large; if you need to read a 2GB file, you need 2GB of RAM. +are extremely large; if you need to read a 2GiB file, you need 2GiB of RAM. (More, really, since for at least a moment you'd need to have both the encoded string and its Unicode version in memory.) diff -r 4e22d9c58ac4 Doc/library/_thread.rst --- a/Doc/library/_thread.rst Tue Feb 12 14:31:06 2013 +0100 +++ b/Doc/library/_thread.rst Tue Feb 12 16:45:30 2013 +0200 @@ -93,15 +93,15 @@ Return the thread stack size used when creating new threads. The optional *size* argument specifies the stack size to be used for subsequently created threads, and must be 0 (use platform or configured default) or a positive - integer value of at least 32,768 (32kB). If changing the thread stack size is + integer value of at least 32,768 (32KiB). If changing the thread stack size is unsupported, a :exc:`RuntimeError` is raised. If the specified stack size is - invalid, a :exc:`ValueError` is raised and the stack size is unmodified. 32kB + invalid, a :exc:`ValueError` is raised and the stack size is unmodified. 32KiB is currently the minimum supported stack size value to guarantee sufficient stack space for the interpreter itself. Note that some platforms may have particular restrictions on values for the stack size, such as requiring a - minimum stack size > 32kB or requiring allocation in multiples of the system + minimum stack size > 32KiB or requiring allocation in multiples of the system memory page size - platform documentation should be referred to for more - information (4kB pages are common; using multiples of 4096 for the stack size is + information (4KiB pages are common; using multiples of 4096 for the stack size is the suggested approach in the absence of more specific information). Availability: Windows, systems with POSIX threads. diff -r 4e22d9c58ac4 Doc/library/os.rst --- a/Doc/library/os.rst Tue Feb 12 14:31:06 2013 +0100 +++ b/Doc/library/os.rst Tue Feb 12 16:45:30 2013 +0200 @@ -2329,7 +2329,7 @@ .. data:: XATTR_SIZE_MAX The maximum size the value of an extended attribute can be. Currently, this - is 64 kilobytes on Linux. + is 64 kibibytes on Linux. .. data:: XATTR_CREATE diff -r 4e22d9c58ac4 Doc/library/posix.rst --- a/Doc/library/posix.rst Tue Feb 12 14:31:06 2013 +0100 +++ b/Doc/library/posix.rst Tue Feb 12 16:45:30 2013 +0200 @@ -37,7 +37,7 @@ .. sectionauthor:: Steve Clift Several operating systems (including AIX, HP-UX, Irix and Solaris) provide -support for files that are larger than 2 GB from a C programming model where +support for files that are larger than 2GiB from a C programming model where :c:type:`int` and :c:type:`long` are 32-bit values. This is typically accomplished by defining the relevant size and offset types as 64-bit values. Such files are sometimes referred to as :dfn:`large files`. diff -r 4e22d9c58ac4 Doc/library/tarfile.rst --- a/Doc/library/tarfile.rst Tue Feb 12 14:31:06 2013 +0100 +++ b/Doc/library/tarfile.rst Tue Feb 12 16:45:30 2013 +0200 @@ -669,11 +669,11 @@ * The POSIX.1-1988 ustar format (:const:`USTAR_FORMAT`). It supports filenames up to a length of at best 256 characters and linknames up to 100 characters. The - maximum file size is 8 gigabytes. This is an old and limited but widely + maximum file size is 8 gibibytes. This is an old and limited but widely supported format. * The GNU tar format (:const:`GNU_FORMAT`). It supports long filenames and - linknames, files bigger than 8 gigabytes and sparse files. It is the de facto + linknames, files bigger than 8 gibibytes and sparse files. It is the de facto standard on GNU/Linux systems. :mod:`tarfile` fully supports the GNU tar extensions for long names, sparse file support is read-only. diff -r 4e22d9c58ac4 Doc/library/threading.rst --- a/Doc/library/threading.rst Tue Feb 12 14:31:06 2013 +0100 +++ b/Doc/library/threading.rst Tue Feb 12 16:45:30 2013 +0200 @@ -80,15 +80,15 @@ Return the thread stack size used when creating new threads. The optional *size* argument specifies the stack size to be used for subsequently created threads, and must be 0 (use platform or configured default) or a positive - integer value of at least 32,768 (32kB). If changing the thread stack size is + integer value of at least 32,768 (32KiB). If changing the thread stack size is unsupported, a :exc:`RuntimeError` is raised. If the specified stack size is - invalid, a :exc:`ValueError` is raised and the stack size is unmodified. 32kB + invalid, a :exc:`ValueError` is raised and the stack size is unmodified. 32KiB is currently the minimum supported stack size value to guarantee sufficient stack space for the interpreter itself. Note that some platforms may have particular restrictions on values for the stack size, such as requiring a - minimum stack size > 32kB or requiring allocation in multiples of the system + minimum stack size > 32KiB or requiring allocation in multiples of the system memory page size - platform documentation should be referred to for more - information (4kB pages are common; using multiples of 4096 for the stack size is + information (4KiB pages are common; using multiples of 4096 for the stack size is the suggested approach in the absence of more specific information). Availability: Windows, systems with POSIX threads. diff -r 4e22d9c58ac4 Doc/library/zipfile.rst --- a/Doc/library/zipfile.rst Tue Feb 12 14:31:06 2013 +0100 +++ b/Doc/library/zipfile.rst Tue Feb 12 16:45:30 2013 +0200 @@ -18,7 +18,7 @@ This module does not currently handle multi-disk ZIP files. It can handle ZIP files that use the ZIP64 extensions -(that is ZIP files that are more than 4 GByte in size). It supports +(that is ZIP files that are more than 4GiB in size). It supports decryption of encrypted files in ZIP archives, but it currently cannot create an encrypted file. Decryption is extremely slow as it is implemented in native Python rather than C. @@ -148,7 +148,7 @@ (:mod:`zlib`, :mod:`bz2` or :mod:`lzma`) is not available, :exc:`RuntimeError` is also raised. The default is :const:`ZIP_STORED`. If *allowZip64* is ``True`` zipfile will create ZIP files that use the ZIP64 extensions when - the zipfile is larger than 2 GB. If it is false (the default) :mod:`zipfile` + the zipfile is larger than 2GiB. If it is false (the default) :mod:`zipfile` will raise an exception when the ZIP file would require ZIP64 extensions. ZIP64 extensions are disabled by default because the default :program:`zip` and :program:`unzip` commands on Unix (the InfoZIP utilities) don't support diff -r 4e22d9c58ac4 Modules/_pickle.c --- a/Modules/_pickle.c Tue Feb 12 14:31:06 2013 +0100 +++ b/Modules/_pickle.c Tue Feb 12 16:45:30 2013 +0200 @@ -1788,7 +1788,7 @@ } else { PyErr_SetString(PyExc_OverflowError, - "cannot serialize a bytes object larger than 4GB"); + "cannot serialize a bytes object larger than 4GiB"); return -1; /* string too large */ } @@ -1888,7 +1888,7 @@ size = PyBytes_GET_SIZE(encoded); if (size > 0xffffffffL) { PyErr_SetString(PyExc_OverflowError, - "cannot serialize a string larger than 4GB"); + "cannot serialize a string larger than 4GiB"); goto error; /* string too large */ }