cpython/Lib
Éric Araujo 880801501b Improve byte-compilation in packaging to be independent of -O or -B.
The code I fixed to comply with PEP 3147 still had one bug: When run
under python -O, some paths for pyc files would be pyo, because I called
imp.cache_from_source without explicit debug_override argument in some
places, and under -O that would return .pyo (this is well explained in
the imp docs).  Now all code (util.byte_compile, build_py, install_lib)
can create .pyo files according to options given by users,
without interference from the calling Python’s own optimize mode.

On a related topic, I also removed the code that prevented byte
compilation under python -B.  The rationale is that packaging gives
control over the creation of pyc files to the user with its own explicit
option, and the behavior should not be changed if the calling Python
happens to run with -B for whatever reason.  I will argue that this is a
bug fix and ask to be allowed to backport this change to distutils.

Finally, I moved one nugget of information about the --compile and
--optimize options from the source into the doc.  It clears up a
misunderstanding that I (and maybe other people) had.
2011-11-03 05:08:28 +01:00
..
collections Issue #13121: Support in-place math operators for collections.Counter(). 2011-10-19 13:40:37 -07:00
concurrent Close the call queue in concurrent.futures.ProcessPoolExecutor when 2011-07-16 23:52:02 +02:00
ctypes Issue #12881: ctypes: Fix segfault with large structure field names. 2011-10-03 21:48:30 -05:00
curses merge from 3.2 - Fix closes Issue11439 Remove the SVN keywords from the code as it is no longer applicable in hg. Patch Contributed by Neil Muller. 2011-07-28 23:39:08 +08:00
dbm Close #13007: whichdb should recognize gdbm 1.9 magic numbers 2011-09-19 17:08:18 +02:00
distutils Merge 3.2 2011-10-28 14:52:29 +02:00
email #665194: support roundtripping RFC2822 date stamps in the email.utils module 2011-07-20 11:41:21 -04:00
encodings Merge 3.2 2011-10-28 14:52:29 +02:00
html #670664: Fix HTMLParser to correctly handle the content of `<script>...</script> and <style>...</style>`. 2011-11-01 14:12:22 +02:00
http Merge with 3.2. 2011-10-19 11:06:26 +03:00
idlelib Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart. 2011-10-30 20:05:30 -07:00
importlib Issue #13303: Fix a race condition in the bytecode file creation. 2011-10-31 20:47:31 +01:00
json Implement PEP 393. 2011-09-28 07:41:54 +02:00
lib2to3 - Re-enable lib2to3's test_parser.py tests, though with an expected failure 2011-10-07 15:26:54 -04:00
logging Merge 3.2 2011-10-28 14:52:29 +02:00
msilib Remove duplication. 2011-10-19 10:58:56 +03:00
multiprocessing Merge 3.2 2011-10-28 14:52:29 +02:00
packaging Improve byte-compilation in packaging to be independent of -O or -B. 2011-11-03 05:08:28 +01:00
plat-aix4
plat-darwin
plat-freebsd4
plat-freebsd5
plat-freebsd6
plat-freebsd7
plat-freebsd8
plat-generic
plat-linux Close #12326: sys.platform is now always 'linux' on Linux 2011-08-20 23:39:26 +02:00
plat-netbsd1
plat-next3
plat-os2emx
plat-sunos5
plat-unixware7
pydoc_data Regenerate pydoc topics. 2011-09-03 10:37:09 +02:00
site-packages
sqlite3 Issue #10811: Use TestCase.assertRaises() in the new test 2011-05-09 12:50:41 +02:00
test Issue #13312: skip the failing negative years for now. 2011-11-02 08:13:43 +01:00
tkinter Merge 3.2 2011-10-28 14:52:29 +02:00
turtledemo #12677: correct turtle orientation in doc 2011-08-07 17:12:19 +02:00
unittest Merge 3.2 2011-10-28 14:52:29 +02:00
urllib 'HTTPSHandler' and not the type. 2011-11-01 23:57:57 +08:00
wsgiref Merged revisions 87797 via svnmerge from 2011-01-06 17:18:32 +00:00
xml Merge 3.2: issue #2892 2011-11-01 23:33:14 +01:00
xmlrpc Fix regression due to changeset 2096158376e5 (issue #13305). 2011-11-01 00:06:58 +01:00
__future__.py
__phello__.foo.py
_compat_pickle.py
_dummy_thread.py Issue #11223: Replace threading._info() by sys.thread_info 2011-04-30 14:53:09 +02:00
_markupbase.py
_pyio.py Issue #12797: Added custom opener parameter to builtin open() and FileIO.open(). 2011-10-31 20:34:46 +02:00
_strptime.py
_threading_local.py
_weakrefset.py Merged revisions 86537,86867-86868,86881,86887,86913-86915,86931-86933,86960,86964,86974,86980,86996,87008,87050 via svnmerge from 2011-02-25 09:48:21 +00:00
abc.py Allow usage of SomeABC.register as a class decorator. Patch by Edoardo Spadolini (#10868). 2011-02-24 18:03:10 +00:00
aifc.py
antigravity.py
argparse.py Merge 3.2 2011-10-28 14:52:29 +02:00
ast.py remove ast.__version__ (closes #12273) 2011-07-15 21:10:13 -05:00
asynchat.py Normalize the encoding names for Latin-1 and UTF-8 to 2011-02-25 15:42:01 +00:00
asyncore.py Use InterruptedError instead of checking for EINTR 2011-10-23 23:49:42 +02:00
base64.py #1466065: add validate option to base64.b64decode 2010-11-11 20:09:20 +00:00
bdb.py Issue #10492: bdb.Bdb.run() only traces the execution of the code 2011-01-06 00:49:38 +00:00
binhex.py remove unused imports (closes #12432) 2011-06-28 10:25:04 -05:00
bisect.py
bz2.py BZ2File now uses the compresslevel argument given by the caller, 2011-09-11 22:38:11 +02:00
calendar.py Fix closes Issue10087 - fixing the output of calendar display in the html format. Patch by Chris Lambacher. Test Contributed by catherine. 2011-08-11 09:22:52 +08:00
cgi.py default - Fix closes Issue12529 - cgi.parse_header failure on double quotes and 2011-10-20 01:06:59 +08:00
cgitb.py remove unused imports (closes #12432) 2011-06-28 10:25:04 -05:00
chunk.py
cmd.py
code.py
codecs.py #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). 2011-09-28 17:37:55 +03:00
codeop.py
colorsys.py
compileall.py #10454: a few edits to compileall help messages 2011-09-01 20:00:33 +02:00
configparser.py Merge with 3.2. 2011-10-19 11:06:26 +03:00
contextlib.py remove unused imports (closes #12432) 2011-06-28 10:25:04 -05:00
copy.py #11572: improvements to copy module tests along with removal of old test suite 2011-08-05 23:05:35 +02:00
copyreg.py Closes #13258: Use callable() built-in in the standard library. 2011-10-28 14:45:05 +02:00
cProfile.py
crypt.py A crypt algorithm may not be available by returning None. 2011-02-22 21:55:51 +00:00
csv.py #11565: Merge with 3.1. 2011-03-16 11:35:38 +02:00
datetime.py Merge with 3.2. 2011-10-19 11:06:26 +03:00
decimal.py Issue #13248, issue #8540: Remove deprecated Context._clamp attribute from Decimal module. 2011-10-24 10:31:52 +01:00
difflib.py #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). 2011-09-28 17:37:55 +03:00
dis.py
doctest.py #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). 2011-09-28 17:37:55 +03:00
dummy_threading.py
filecmp.py Issue 11802: filecmp cache was growing without bound. 2011-06-25 17:20:21 +02:00
fileinput.py Closes #13258: Use callable() built-in in the standard library. 2011-10-28 14:45:05 +02:00
fnmatch.py Bytes are already distinct from text, so typed=True isn't necessary. 2011-10-20 09:42:05 -07:00
formatter.py
fractions.py Make Fraction(-1).__hash__() return -2 rather than -1 (see issue 10356). 2010-11-13 10:27:38 +00:00
ftplib.py Cleanup code: remove int/long idioms and simplify a while statement. 2011-10-23 22:11:00 +02:00
functools.py Issue 13227: Option to make the lru_cache() type specific (suggested by Andrew Koenig). 2011-10-20 08:57:45 -07:00
genericpath.py
getopt.py Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9) 2011-03-21 16:04:06 +01:00
getpass.py Fix for issue11236 getpass.getpass to respond ctrl-c or ctrl-z 2011-04-26 20:59:46 +08:00
gettext.py #11515: Merge with 3.1. 2011-03-15 05:59:46 +02:00
glob.py Fix closes issue12432 - remove the unused sys from glob.py 2011-07-03 17:21:05 -07:00
gzip.py Remove dead code in gzip. 2011-04-13 18:57:40 +02:00
hashlib.py fix whitespace 2011-05-14 15:35:56 -07:00
heapq.py Issue 13274: Make the pure python code for heapq more closely match the C implementation for an undefined corner case. 2011-10-30 14:32:54 -07:00
hmac.py Closes #13258: Use callable() built-in in the standard library. 2011-10-28 14:45:05 +02:00
imaplib.py Issue #1441530: In imaplib, read the data in one chunk to speed up large 2011-05-24 23:47:49 +02:00
imghdr.py
inspect.py remove unused imports (closes #12432) 2011-06-28 10:25:04 -05:00
io.py
keyword.py
linecache.py
locale.py Closes #13283: removal of two unused variable in locale.py 2011-10-31 16:03:34 +01:00
macpath.py
macurl2path.py
mailbox.py Close #12454: The mailbox module is now using ASCII, instead of the locale 2011-10-17 20:44:22 +02:00
mailcap.py Fix #9923: mailcap now uses the OS path separator for the MAILCAP envvar. Not backported, since it could break cases where people worked around the old POSIX-specific behaviour on non-POSIX platforms. 2011-08-28 00:17:31 +10:00
mimetypes.py (Merge 3.2) Issue #13025: mimetypes is now reading MIME types using the UTF-8 2011-10-14 03:05:10 +02:00
modulefinder.py Fix bug I unwittingly added in 1521d9837d16 (found by Ezio Melotti) 2011-08-01 15:29:07 +02:00
netrc.py fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
nntplib.py #11515: Merge with 3.1. 2011-03-15 05:59:46 +02:00
ntpath.py Correction to 88e318166eaf - Issue #11583 2011-06-09 09:10:38 -05:00
nturl2path.py Fix Issue11474 - fix url2pathname() handling of '/C|/' on Windows 2011-04-14 13:16:30 +08:00
numbers.py Remove the funky function annotation from numbers.py. 2011-01-12 20:54:53 +00:00
opcode.py excise the remains of STOP_CODE, which hasn't done anything useful for years 2011-07-17 22:49:50 -05:00
optparse.py Merge 3.2 2011-10-28 14:52:29 +02:00
os.py Issue #11459: A bufsize value of 0 in subprocess.Popen() really creates 2011-03-19 17:04:13 +01:00
os2emxpath.py
pdb.py Add display/undisplay pdb commands. 2010-12-04 16:21:42 +00:00
pickle.py Merge 3.2 2011-10-28 14:52:29 +02:00
pickletools.py Cleanup code: remove int/long idioms and simplify a while statement. 2011-10-23 22:11:00 +02:00
pipes.py Merge doc changes from 3.2 (#10454, #12298) 2011-09-02 00:03:20 +02:00
pkgutil.py merge from 3.2 2011-10-06 14:24:31 -07:00
platform.py Make platform.libc_ver() less slow 2011-10-07 13:26:59 +02:00
plistlib.py Issue #12452: Plist and Dict are now deprecated 2011-07-04 14:28:45 +02:00
poplib.py Issue 11291: poplib suppresses errors on QUIT. 2011-02-25 22:28:24 +00:00
posixpath.py
pprint.py
profile.py strip trailing ws 2011-06-27 09:18:46 -05:00
pstats.py Merge profile docs followup (#12417) from 3.1 2011-07-28 23:00:14 +02:00
pty.py
py_compile.py Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile. 2010-12-04 10:26:46 +00:00
pyclbr.py Issue 11020: command-line pyclbr broken due to missing 2-to-3 conversion. 2011-01-27 00:12:08 +00:00
pydoc.py Merge 3.2 2011-10-28 14:52:29 +02:00
queue.py
quopri.py
random.py Code simplification suggested by Sven Marnach. 2011-06-25 11:31:46 +02:00
re.py Merge 3.2 2011-10-28 14:52:29 +02:00
reprlib.py Avoid pulling threading when _thread is sufficient 2011-10-11 18:51:53 +02:00
rlcompleter.py Closes #13258: Use callable() built-in in the standard library. 2011-10-28 14:45:05 +02:00
runpy.py Issue #12451: runpy: run_path() now opens the Python script in binary mode, 2011-07-04 01:45:39 +02:00
sched.py Remove duplication. 2011-10-19 10:58:56 +03:00
shelve.py #7905: Actually respect the keyencoding parameter to shelve.Shelf. 2010-12-04 11:12:43 +00:00
shlex.py #9723: refactor regex. 2011-08-16 19:03:41 +03:00
shutil.py Merge 3.2 2011-10-28 14:52:29 +02:00
site.py Replace open(filename, 'rU') by open(filename, 'r') 2011-05-04 13:55:36 +02:00
smtpd.py Issue #9168: now smtpd is able to bind privileged port. 2011-10-20 23:14:36 +02:00
smtplib.py #12448: merge with 3.2. 2011-10-18 13:26:49 +03:00
sndhdr.py
socket.py Use InterruptedError instead of checking for EINTR 2011-10-23 23:49:42 +02:00
socketserver.py #13289: merge with 3.2. 2011-10-29 10:44:59 +03:00
sre_compile.py #13054: fix usage of sys.maxunicode after PEP-393. 2011-10-04 19:06:00 +03:00
sre_constants.py
sre_parse.py Normalize the encoding names for Latin-1 and UTF-8 to 2011-02-25 15:42:01 +00:00
ssl.py Issue #11183: Add finer-grained exceptions to the ssl module, so that 2011-10-27 23:56:55 +02:00
stat.py Issue #8746: Correct faulty configure checks so that os.chflags() and 2011-06-28 00:00:28 -07:00
string.py #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). 2011-09-28 17:37:55 +03:00
stringprep.py
struct.py Issue #11081: Fixed struct.__all__. Reviewed by Georg Brandl. 2011-01-31 19:27:55 +00:00
subprocess.py Use InterruptedError instead of checking for EINTR 2011-10-23 23:49:42 +02:00
sunau.py
symbol.py
symtable.py
sysconfig.cfg Remove inline comment, no longer supported by configparser. 2011-10-05 01:14:02 +02:00
sysconfig.py Issue #13150: Add a comment in _sysconfigdata to explain the origin of this file 2011-10-20 00:41:21 +02:00
tabnanny.py Fix #12811 by closing files promptly in tabnanny.check. Patch by Anthony Briggs. 2011-08-22 16:19:19 +10:00
tarfile.py Simplify and remove few dependencies on 'errno', thanks to PEP 3151. 2011-10-28 16:06:23 +02:00
telnetlib.py Merged revisions 87230 via svnmerge from 2010-12-14 14:27:27 +00:00
tempfile.py Remove no-op code from previous commit. 2011-10-28 21:58:56 +02:00
textwrap.py merge from 3.2 - Fix closes Issue11439 Remove the SVN keywords from the code as it is no longer applicable in hg. Patch Contributed by Neil Muller. 2011-07-28 23:39:08 +08:00
this.py
threading.py Merge with 3.2. 2011-10-19 11:06:26 +03:00
timeit.py Merge 3.2 2011-10-28 14:52:29 +02:00
token.py Issue #10386: Added __all__ to token module; this simplifies importing 2010-11-11 14:07:41 +00:00
tokenize.py Issue #13150: The tokenize module doesn't compile large regular expressions at startup anymore. 2011-10-11 15:45:56 +02:00
trace.py Prevent deprecation warning 2011-04-17 16:48:52 +02:00
traceback.py
tty.py
turtle.py Merge with 3.2. 2011-10-19 11:06:26 +03:00
types.py
uu.py
uuid.py
warnings.py Closes #13258: Use callable() built-in in the standard library. 2011-10-28 14:45:05 +02:00
wave.py Issue #10783: struct.pack() doesn't encode implicitly unicode to UTF-8 2010-12-28 13:26:42 +00:00
weakref.py Use booleans. 2010-12-03 07:49:09 +00:00
webbrowser.py #12601: fix typo. 2011-07-21 11:16:32 +03:00
xdrlib.py Cleanup code: remove int/long idioms and simplify a while statement. 2011-10-23 22:11:00 +02:00
zipfile.py 3.2 - Fix closes Issue6090 - Raise a ValueError, instead of failing with unrelated 2011-10-20 01:46:00 +08:00