GNU bug report logs - #8847
New format/layout for byte-compiled files in python >= 3.2 penalizes automake support

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Mon, 13 Jun 2011 09:47:01 UTC

Severity: normal

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#8847: closed (New format/layout for byte-compiled files in
 python >= 3.2 penalizes automake support)
Date: Wed, 21 Nov 2012 13:25:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 21 Nov 2012 14:23:11 +0100
with message-id <50ACD5BF.4050606 <at> gmail.com>
and subject line Re: [PATCH 0/8] tests: support for PEP-3147, and testsuite fixes
has caused the debbugs.gnu.org bug report #8847,
regarding New format/layout for byte-compiled files in python >= 3.2 penalizes automake support
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
8847: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8847
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: New format/layout for byte-compiled files in python >= 3.2 penalizes
	automake support
Date: Mon, 13 Jun 2011 11:45:45 +0200
Python 3.2 has changed the way in which byte-compiled files are stored
and searched for, introducing the new concept of a cache directory
`__pycache__' where version-specific byte-compiled files can be stored,
for many different python versions and implementations at once:

 <http://www.python.org/dev/peps/pep-3147/>

This bit (from the "Proposal" section) is mostly relevant to us:

 ``.pyc file outside of __pycache__ will only be imported if the .py
    source file is missing.''

This means that the byte-compiled files installed by the Python support in
Automake will not be used by newer (>= 3.2) python versions :-(

Luckily for us, this is "just" an optimization issue, not a correctness one:
python 3.2 and later will simply use the *.py files installed by automake,
the only downside being that it will have to recompile them on the fly each
time.

Nonetheless, I think this issue should be fixed in automake 1.12.

Regards,
  Stefano



[Message part 3 (message/rfc822, inline)]
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: automake-patches <at> gnu.org
Cc: yselkowitz <at> users.sourceforge.net, 8847-done <at> debbugs.gnu.org
Subject: Re: [PATCH 0/8] tests: support for PEP-3147, and testsuite fixes
Date: Wed, 21 Nov 2012 14:23:11 +0100
On 11/19/2012 11:12 PM, Stefano Lattarini wrote:
> Original patch:
> <http://lists.gnu.org/archive/html/automake-patches/2012-11/msg00023.html>
> 
> Yaakov Selkowitz (1):
>   python: improve support for modern python (CPython 3.2 and PyPy)
> 
> Stefano Lattarini (7):
>   news: document fix for bug#8847 (PEP-3147, __pycache__)
>   tests: typofix in message
>   tests: honour $PYTHON override
>   tests: improve a comment
>   python: uninstall cater to PEP-3147
>   python tests: support PEP-3147 installation layout
>   tests: fix a spurious failure when $PYTHON is in the environment
> 
>  NEWS                             |  3 ++
>  lib/am/python.am                 | 30 ++++++++++---
>  lib/py-compile                   | 18 ++++++--
>  m4/python.m4                     |  2 +-
>  t/ax/am-test-lib.sh              | 66 ++++++++++++++++++++++++++--
>  t/list-of-tests.mk               |  1 -
>  t/nobase-python.sh               | 50 +++++++++++----------
>  t/py-compile-basedir.sh          | 18 +++++---
>  t/py-compile-basic.sh            | 19 +++++---
>  t/py-compile-basic2.sh           | 70 -----------------------------
>  t/py-compile-destdir.sh          | 22 ++++++----
>  t/py-compile-option-terminate.sh | 20 ++++-----
>  t/python-pr10995.sh              |  8 ++--
>  t/python-too-old.sh              |  3 +-
>  t/python-vars.sh                 |  2 -
>  t/python-virtualenv.sh           | 95 +++++++++++++++++++++++-----------------
>  t/python10.sh                    | 36 +++++++--------
>  t/python11.sh                    |  3 ++
>  t/python12.sh                    | 14 +++---
>  t/python3.sh                     |  6 +--
>  20 files changed, 272 insertions(+), 214 deletions(-)
>  delete mode 100755 t/py-compile-basic2.sh
> 
I've pushed this series to maint.  Will soon merge into master as well.
I'm thus closing automake bug#8847.

Regards,
  Stefano


This bug report was last modified 12 years and 240 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.