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.

classification
Title: py_compile and compileall need unit tests
Type: crash Stage:
Components: Library (Lib) Versions: Python 3.0
process
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.

Files
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/compileall.py
Listing /home/heimes/dev/python/py3k/Lib ...
Compiling /home/heimes/dev/python/py3k/Lib/pydoc.py ...
Traceback (most recent call last):
  File "Lib/compileall.py", line 162, in <module>
    exit_status = int(not main())
  File "Lib/compileall.py", line 155, in main
    success = compile_path()
  File "Lib/compileall.py", line 110, in compile_path
    force, quiet=quiet)
  File "Lib/compileall.py", line 65, in compile_dir
    ok = py_compile.compile(fullname, None, dfile, True)
  File "/home/heimes/dev/python/py3k/Lib/py_compile.py", line 137, in
compile
    codestring = f.read()
  File "/home/heimes/dev/python/py3k/Lib/io.py", line 1243, in read
    decoder = self._decoder or self._get_decoder()
  File "/home/heimes/dev/python/py3k/Lib/io.py", line 1132, in _get_decoder
    make_decoder = codecs.getincrementaldecoder(self._encoding)
  File "/home/heimes/dev/python/py3k/Lib/codecs.py", line 951, in
getincrementaldecoder
    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.

Index: Makefile.pre.in
===================================================================
--- Makefile.pre.in     (Revision 58923)
+++ Makefile.pre.in     (Arbeitskopie)
@@ -610,7 +610,7 @@

 TESTOPTS=      -l $(EXTRATESTOPTS)
 TESTPROG=      $(srcdir)/Lib/test/regrtest.py
-TESTPYTHON=    $(RUNSHARED) ./$(BUILDPYTHON) -E -tt
+TESTPYTHON=    $(RUNSHARED) ./$(BUILDPYTHON) -E -tt -bb
 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/compileall.py
+               -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
History
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