This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: py_compile and compileall need unit tests
Type: crash Stage:
Components: Library (Lib) Versions: Python 3.0
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, gvanrossum
Priority: low Keywords:

Created on 2007-11-08 14:01 by christian.heimes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
makefile_compileall.patch christian.heimes, 2007-11-09 20:03
Messages (5)
msg57244 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-08 14:01
$ ./python Lib/
Listing /home/heimes/dev/python/py3k/Lib ...
Compiling /home/heimes/dev/python/py3k/Lib/ ...
Traceback (most recent call last):
  File "Lib/", line 162, in <module>
    exit_status = int(not main())
  File "Lib/", line 155, in main
    success = compile_path()
  File "Lib/", line 110, in compile_path
    force, quiet=quiet)
  File "Lib/", line 65, in compile_dir
    ok = py_compile.compile(fullname, None, dfile, True)
  File "/home/heimes/dev/python/py3k/Lib/", line 137, in
    codestring =
  File "/home/heimes/dev/python/py3k/Lib/", line 1243, in read
    decoder = self._decoder or self._get_decoder()
  File "/home/heimes/dev/python/py3k/Lib/", line 1132, in _get_decoder
    make_decoder = codecs.getincrementaldecoder(self._encoding)
  File "/home/heimes/dev/python/py3k/Lib/", line 951, in
    decoder = lookup(encoding).incrementaldecoder
LookupError: unknown encoding: b'Latin-1'
msg57257 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-08 16:35
I've fixed the bug in r58913. The modules need more unit tests.
msg57318 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-09 19:23
Why is it still open?
msg57322 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-09 20:03
I've left this bug open because no unit tests verifies that compileall
can compile all files under Lib/. It has caused a problem with the
Windows installer in 3.0a1 for some people.

I like to add a compileall followed by a cleanup to make testall. I hope
that's called before a release gets out.

---     (Revision 58923)
+++     (Arbeitskopie)
@@ -610,7 +610,7 @@

 TESTPROG=      $(srcdir)/Lib/test/
 test:          all platform
                -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
                -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
@@ -618,6 +618,8 @@

 testall:       all platform
                -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+               $(TESTPYTHON) Lib/
+               -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
                -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
                $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
msg57724 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-21 02:54
Comitted in r59092
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45744
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007-11-21 02:54:04christian.heimessetstatus: open -> closed
resolution: accepted -> fixed
messages: + msg57724
2007-11-09 20:03:12christian.heimessetfiles: + makefile_compileall.patch
messages: + msg57322
2007-11-09 19:23:21gvanrossumsetnosy: + gvanrossum
messages: + msg57318
2007-11-08 16:35:07christian.heimessetpriority: high -> low
resolution: accepted
messages: + msg57257
title: io or codecs bug in codecs.getincrementaldecoder -> py_compile and compileall need unit tests
2007-11-08 14:06:58christian.heimeslinkissue1110 superseder
2007-11-08 14:01:08christian.heimescreate