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: Addition of abiflags breaks distutils
Type: Stage: resolved
Components: Distutils2 Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: tarek Nosy List: Arfrever, a.badger, alexis, barry, doko, eric.araujo, georg.brandl, pitrou, tarek
Priority: normal Keywords:

Created on 2011-02-12 18:28 by a.badger, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg128448 - (view) Author: Toshio Kuratomi (a.badger) * Date: 2011-02-12 18:28
When trying to build distribute on the latest python-3.2rc I get the following traceback in the unittests (two others that are similar as well):

======================================================================
ERROR: test_develop (setuptools.tests.test_develop.TestDevelopTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.2/distutils/util.py", line 283, in subst_vars
    return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s)
  File "/usr/lib/python3.2/re.py", line 167, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/usr/lib/python3.2/distutils/util.py", line 280, in _subst
    return os.environ[var_name]
  File "/usr/lib/python3.2/os.py", line 450, in __getitem__
    value = self._data[self.encodekey(key)]
KeyError: b'abiflags'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "build/src/setuptools/tests/test_develop.py", line 52, in test_develop
    cmd.ensure_finalized()
  File "/usr/lib/python3.2/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "build/src/setuptools/command/develop.py", line 51, in finalize_options
    easy_install.finalize_options(self)
  File "build/src/setuptools/command/easy_install.py", line 225, in finalize_options
    self.expand_dirs()
  File "build/src/setuptools/command/easy_install.py", line 335, in expand_dirs
    'install_scripts', 'install_data',])
  File "build/src/setuptools/command/easy_install.py", line 323, in _expand_attrs
    val = subst_vars(val, self.config_vars)
  File "/usr/lib/python3.2/distutils/util.py", line 285, in subst_vars
    raise ValueError("invalid variable '$%s'" % var)
ValueError: invalid variable '$b'abiflags''

It seems that something in the addition of abiflags is causing distutils to search for abiflags in os.environ.  After talking with tarek on IRC we decided to open a bug here to see whether this is desirable change in behaviour within the stdlib.

The revision introducing abiflags is here: http://svn.python.org/view?view=rev&revision=85697
msg128450 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-02-12 18:51
Actually, looks like distribute should be updated to include "abiflags" in self.config_vars in setuptools/command/easy_install.py. There seems to be a whole bunch of code pasted directly from distutils and it isn't up-to-date anymore. Compare:
https://bitbucket.org/tarek/distribute/src/4ab9b96dc540/setuptools/command/easy_install.py#cl-195
with:
http://code.python.org/hg/branches/py3k/file/9b1daa80168d/Lib/distutils/command/install.py#l321

This bug probably needs to be reported to the distribute issue tracker instead. Tarek, Éric, can you proceed?
msg128928 - (view) Author: Toshio Kuratomi (a.badger) * Date: 2011-02-20 23:10
Ha!  Your reply jogged my memory.  MvL mentioned exactly the potential for this backwards incompatibility here: http://mail.python.org/pipermail/python-dev/2010-December/106351.html when talking about whether other API changes could go into distutils to support accepted PEPs.

tarek, eric, since python-3.2 is now out, I assume that you're going to want to port distribute rather than back the changes out of distutils.  Do you want a bug report or is this high enough priority that you're already working on it?
msg128946 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2011-02-21 07:25
Toshio: yeah go ahead and add one, and let's do this asap in Distribute
msg128947 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2011-02-21 07:43
Also, let's keep this open/valid for Distutils2
msg129111 - (view) Author: Toshio Kuratomi (a.badger) * Date: 2011-02-22 19:10
Distribute issue opened and patch based on Antoine's comments attached.

https://bitbucket.org/tarek/distribute/issue/191/distribute-fails-unittests-on-python-32
msg137871 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-07 17:47
Now fixed in packaging too.
History
Date User Action Args
2022-04-11 14:57:12adminsetgithub: 55409
2011-06-07 17:47:58eric.araujosetstatus: open -> closed
resolution: fixed
messages: + msg137871

stage: resolved
2011-02-22 19:10:40a.badgersetnosy: barry, georg.brandl, doko, pitrou, tarek, eric.araujo, a.badger, Arfrever, alexis
messages: + msg129111
2011-02-21 07:43:06tareksetnosy: + alexis, eric.araujo
messages: + msg128947

components: + Distutils2, - Library (Lib)
resolution: not a bug -> (no value)
2011-02-21 07:25:01tareksetnosy: barry, georg.brandl, doko, pitrou, tarek, a.badger, Arfrever
messages: + msg128946
2011-02-20 23:10:57a.badgersetstatus: pending -> open
nosy: barry, georg.brandl, doko, pitrou, tarek, a.badger, Arfrever
messages: + msg128928
2011-02-12 18:51:51pitrousetstatus: open -> pending

nosy: + pitrou
messages: + msg128450

assignee: tarek
resolution: not a bug
2011-02-12 18:41:23Arfreversetnosy: + Arfrever
2011-02-12 18:40:03pitrousetnosy: + georg.brandl
2011-02-12 18:28:05a.badgercreate