[New-bugs-announce] [issue29585] site.py imports relatively large `sysconfig` module.

INADA Naoki report at bugs.python.org
Fri Feb 17 04:57:03 EST 2017


New submission from INADA Naoki:

site.py uses sysconfig (and sysconfigdata, _osx_support) module for user-site package.

But sysconfig module is not so lightweight, and very rarely used.
Actually speaking, only tests and distutils uses sysconfig in stdlibs.

And it takes about 7% of startup time, only for searching user-site path.

I tried to port minimal subset of sysconfig into site.py (GH-136).
But 'PYTHONFRAMEWORK' is only in sysconfigdata.  So I couldn't get rid sysconfig dependency completely.

How can I do to solve this?

a) Drop "osx_framework_user" (`~/Library/Python/3.7/`) support completely.
b) Add "sys._osx_framework" attribute
c) Create minimal sysconfigdata only for site.py
d) anything else?

----------
components: Library (Lib)
messages: 287981
nosy: inada.naoki
priority: normal
pull_requests: 101
severity: normal
status: open
title: site.py imports relatively large `sysconfig` module.
type: performance
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29585>
_______________________________________


More information about the New-bugs-announce mailing list