summaryrefslogtreecommitdiff
path: root/_distutils_hack
Commit message (Collapse)AuthorAgeFilesLines
* Add exclusions for specific tests. Fixes #3383.Jason R. Coombs2022-06-171-6/+41
|
* When loading distutils from the vendored copy, rewrite __name__ to ensure ↵Jason R. Coombs2022-02-151-0/+2
| | | | consistent importing from inside and out. Fixes #3035.
* Remove workaround for pypa/get-pip#137.Jason R. Coombs2022-02-111-35/+0
|
* Suppress distutils replacement when building or testing CPython. Fixes ↵Jason R. Coombs2022-01-161-0/+11
| | | | #2965. Fixes #3007.
* Refactor to generalize script detection.Jason R. Coombs2022-01-161-8/+5
|
* Remove filtering of distutils warnings. Ref #3009.Jason R. Coombs2022-01-161-11/+0
|
* Instead of detecting 'get-pip' during the import of pip, detect the attempt ↵bugfix/2993-reduxJason R. Coombs2022-01-101-2/+27
| | | | to 'import setuptools' during 'get-pip', and in that case, stub the import to signal the presence of setuptools. Ref #3022. Fixes #2993.
* Merge pull request #2990 from asottile/distutils-hack-set-originJason R. Coombs2022-01-081-1/+3
|\ | | | | set origin= for distutils.__spec__
| * set origin= for distutils.__spec__Anthony Sottile2022-01-081-1/+3
| | | | | | | | set origin so spec finding reports the correct location -- https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec
* | Move filter into meta finderChristian Heimes2022-01-081-20/+21
| |
* | Use internal warnings API and _TrivialRe hack to install filterChristian Heimes2022-01-081-6/+19
| |
* | Temporarily add back filter, tests fail without itChristian Heimes2022-01-081-4/+4
| |
* | Speedup startup of Python by importing lessChristian Heimes2022-01-081-28/+22
|/ | | | | | | | | | | | | | | ``_distutils_hack`` is imported by a ``.pth`` file at every start of a Python interpreter. The import of costly modules like ``re`` and ``contextlib`` almost doubles the initial startup time of an interpreter. - replace ``contextlib`` with simple context manager and try/except - replace ``re`` with simple string match - move import of ``importlib`` into function body - remove ``warnings.filterwarnings()``, which imports ``re``, too. Fixes: #3006 Signed-off-by: Christian Heimes <christian@python.org>
* Suppress AttributeError when detecting get-pip. Fixes #3002.Jason R. Coombs2022-01-051-0/+12
|
* Add another exception for the exclusion for pip. Fixes #2993.bugfix/2993-get-pip-exemptionJason R. Coombs2022-01-021-0/+10
|
* Merge pull request #2962 from nitzmahone/setuptools_picky_shimJason R. Coombs2021-12-291-6/+12
|\ | | | | distutils shim should ignore setuptools on another path
| * Merge branch 'main' into setuptools_picky_shimJason R. Coombs2021-12-291-6/+25
| |\
| * | Check early for the presence of local distutils and bail out if the found ↵Jason R. Coombs2021-12-291-8/+6
| | | | | | | | | | | | version of Setuptools doesn't have distutils.
| * | Restore assertion about expected distutils.Jason R. Coombs2021-12-291-3/+1
| | |
| * | distutils shim should ignore setuptools on another pathMatt Davis2021-12-231-1/+12
| | |
* | | Restore 'add_shim' as the way to invoke the hook. Avoids compatibility ↵Jason R. Coombs2021-12-291-4/+4
| |/ |/| | | | | issues between different versions of Setuptools with the distutils local implementation. Renamed the former 'add_shim' as 'insert_shim'. Fixes #2983
* | Bypass distutils loader when setuptools module is no longer available on ↵Jason R. Coombs2021-12-281-0/+7
| | | | | | | | sys.path. Fixes #2980.
* | In distutils_hack, only add the metadata finder once. In ↵Jason R. Coombs2021-12-231-3/+16
|/ | | | ensure_local_distutils, rely on a context manager for reliable manipulation. Fixes #2958.
* Avoid KeyError in distutils hack when pip is imported during ensurepip. ↵Jason R. Coombs2021-12-201-1/+5
| | | | Fixes #2940.
* Extract frame_file_is_setup.Jason R. Coombs2021-12-201-3/+7
|
* Merge pull request #2896 from pypa/feature/local-distutilsJason R. Coombs2021-12-191-1/+1
|\ | | | | Restore local distutils as the default.
| * Restore local distutils as the default.Jason R. Coombs2021-11-181-1/+1
| |
* | Bind to 'distutils.log' late in case the loader has changed.Jason R. Coombs2021-11-261-1/+1
| |
* | In ensure_local_distutils, re-use DistutilsMetaFinder to load the module. ↵bugfix/2906-distutils-raceJason R. Coombs2021-11-261-4/+8
|/ | | | Avoids race conditions when _distutils_system_mod is employed and fixes #2906.
* Relax the distutils deprecation regexMiro Hrončok2021-05-041-1/+1
| | | | | There is new message: > The distutils.sysconfig module is deprecated, use sysconfig instead
* Filter out distutils deprecation warning until the situation is resolvedMiro Hrončok2021-03-081-0/+5
| | | | | | The distutils platform problems are likely to be resolved before the removal. Once this happens, setuptools will no longer use distutils from the Python standard library.
* When pip is imported as part of a build, leave distutils patched. Fixes #2355.Jason R. Coombs2020-09-041-0/+13
|
* 👹 Feed the hobgoblins (delint).Jason R. Coombs2020-09-041-2/+2
|
* Make stdlib distutils the default again. Stop the burning. Ref #2350 and others.Jason R. Coombs2020-09-021-1/+1
|
* In distutils hack, use absolute import rather than relative to avoid ↵Jason R. Coombs2020-09-011-1/+1
| | | | bpo-30876. Fixes #2352.
* Add Python 3.10 support to _distutils_hackVictor Stinner2020-09-011-1/+2
| | | | | Get the 'Loader' abstract class from importlib.abc rather than importlib.util.abc (alias removed in Python 3.10).
* Refactor to use lookups and consolidate behaviors.Jason R. Coombs2020-08-151-12/+8
|
* When pip is imported, unload any existing distutils and disable the ↵Jason R. Coombs2020-08-151-8/+11
| | | | DistutilsMetaFinder.
* Bypass .pth loader when distutils is loaded from pip. Workaround for ↵Jason R. Coombs2020-08-141-1/+12
| | | | pypa/pip#8761.
* Merge branch 'master' into bugfix/2232-adopt-distutils-defaultJason R. Coombs2020-08-131-4/+7
|\
| * Fix issue with distutils warningPaul Ganssle2020-08-101-4/+7
| |
* | Merge branch 'master' into bugfix/2232-adopt-distutils-defaultJason R. Coombs2020-08-101-1/+1
|/
* Restore location of 'enabled'Jason R. Coombs2020-08-081-8/+8
|
* remove shim should by symmetric to add_shimJason R. Coombs2020-08-051-1/+1
|
* Move all but a small shim in override into _distutils_hackJason R. Coombs2020-07-262-54/+52
|
* Replace install behavior on import with direct invocation (now that ↵Jason R. Coombs2020-07-261-5/+0
| | | | 'enabled' logic is duplicated in pth file).
* Rename _distutils_importer to _distutils_hack, as it supplies more than just ↵Jason R. Coombs2020-07-263-0/+104
an importer.