Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_distutils fails - sysconfig._config_vars is None #50060

Closed
srid mannequin opened this issue Apr 22, 2009 · 3 comments
Closed

test_distutils fails - sysconfig._config_vars is None #50060

srid mannequin opened this issue Apr 22, 2009 · 3 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@srid
Copy link
Mannequin

srid mannequin commented Apr 22, 2009

BPO 5810
Nosy @tarekziade

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/tarekziade'
closed_at = <Date 2009-04-25.12:59:02.543>
created_at = <Date 2009-04-22.01:00:40.577>
labels = ['type-bug', 'library']
title = 'test_distutils fails - sysconfig._config_vars is None'
updated_at = <Date 2009-04-25.12:59:02.542>
user = 'https://bugs.python.org/srid'

bugs.python.org fields:

activity = <Date 2009-04-25.12:59:02.542>
actor = 'tarek'
assignee = 'tarek'
closed = True
closed_date = <Date 2009-04-25.12:59:02.543>
closer = 'tarek'
components = ['Distutils']
creation = <Date 2009-04-22.01:00:40.577>
creator = 'srid'
dependencies = []
files = []
hgrepos = []
issue_num = 5810
keywords = []
message_count = 3.0
messages = ['86266', '86280', '86502']
nosy_count = 3.0
nosy_names = ['tarek', 'trentm', 'srid']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue5810'
versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

@srid
Copy link
Mannequin Author

srid mannequin commented Apr 22, 2009

Sorry, but the commit r69598 (due to bpo-4524) has a problem. On
Windows and Linux (although not on MacOSX), test_distutils fails:

test_distutils
test test_distutils failed -- Traceback (most recent call last):
  File "C:\Python26\lib\distutils\tests\test_build_scripts.py", line 93,
in test_version_int
    old = sysconfig._config_vars.get('VERSION')
AttributeError: 'NoneType' object has no attribute 'get'

Using the documented API (sysconfig.get_config_vars()) instead of an
uninitialized private variable (sysconfig._config_vars.get('VERSION'))
may fix it.

The following session is from my a Windows machine:

>>> from distutils import sysconfig
>>> print sysconfig._config_vars
None
>>> s = sysconfig.get_config_vars()
>>> s
{'EXE': '.exe', ...}
>>> sysconfig._config_vars
{'EXE': '.exe', ...}
>>>

We face this failure while testing the ActivePython builds based on
Python 2.6.2.

@srid srid mannequin assigned tarekziade Apr 22, 2009
@srid srid mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Apr 22, 2009
@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Apr 22, 2009

While your fix proposal is accurate, _config_vars is initialized in the
test framework because it is used by various part.

I was unable to reproduce your issue, how do you do ?

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Apr 25, 2009

Applied in r71884 (r71887) and r71886 (r71889) nevertheless

@tarekziade tarekziade mannequin closed this as completed Apr 25, 2009
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants