bro
This commit is contained in:
1 parent
de41a02749
commit
9af09cebd3
764 files changed
+54048
-78689
No files matched your search
+3
-5
@@ -1,8 +1,6 @@
|
|||||||
#!/home/zlata/PycharmProjects/Funktional/.venv/bin/python
|
#!/home/zlata/PycharmProjects/Funktional/.venv/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
|
from pip._internal.cli.main import cli
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from pip._internal.cli.main import main
|
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
sys.exit(cli())
|
||||||
sys.exit(main())
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/home/zlata/PycharmProjects/Funktional/.venv/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
if __name__ == '__main__':
|
|
||||||
from pip._internal.cli.main import main
|
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
|
||||||
sys.exit(main())
|
|
||||||
+3
-5
@@ -1,8 +1,6 @@
|
|||||||
#!/home/zlata/PycharmProjects/Funktional/.venv/bin/python
|
#!/home/zlata/PycharmProjects/Funktional/.venv/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
|
from pip._internal.cli.main import cli
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from pip._internal.cli.main import main
|
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
sys.exit(cli())
|
||||||
sys.exit(main())
|
|
||||||
+3
-5
@@ -1,8 +1,6 @@
|
|||||||
#!/home/zlata/PycharmProjects/Funktional/.venv/bin/python
|
#!/home/zlata/PycharmProjects/Funktional/.venv/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
|
from pip._internal.cli.main import cli
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from pip._internal.cli.main import main
|
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
sys.exit(cli())
|
||||||
sys.exit(main())
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
pip
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
Metadata-Version: 2.4
|
|
||||||
Name: pip
|
|
||||||
Version: 26.0.1
|
|
||||||
Summary: The PyPA recommended tool for installing Python packages.
|
|
||||||
Author-email: The pip developers <distutils-sig@python.org>
|
|
||||||
Requires-Python: >=3.9
|
|
||||||
Description-Content-Type: text/x-rst
|
|
||||||
License-Expression: MIT
|
|
||||||
Classifier: Development Status :: 5 - Production/Stable
|
|
||||||
Classifier: Intended Audience :: Developers
|
|
||||||
Classifier: Topic :: Software Development :: Build Tools
|
|
||||||
Classifier: Programming Language :: Python
|
|
||||||
Classifier: Programming Language :: Python :: 3
|
|
||||||
Classifier: Programming Language :: Python :: 3 :: Only
|
|
||||||
Classifier: Programming Language :: Python :: 3.9
|
|
||||||
Classifier: Programming Language :: Python :: 3.10
|
|
||||||
Classifier: Programming Language :: Python :: 3.11
|
|
||||||
Classifier: Programming Language :: Python :: 3.12
|
|
||||||
Classifier: Programming Language :: Python :: 3.13
|
|
||||||
Classifier: Programming Language :: Python :: 3.14
|
|
||||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
||||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
||||||
License-File: AUTHORS.txt
|
|
||||||
License-File: LICENSE.txt
|
|
||||||
License-File: src/pip/_vendor/cachecontrol/LICENSE.txt
|
|
||||||
License-File: src/pip/_vendor/certifi/LICENSE
|
|
||||||
License-File: src/pip/_vendor/dependency_groups/LICENSE.txt
|
|
||||||
License-File: src/pip/_vendor/distlib/LICENSE.txt
|
|
||||||
License-File: src/pip/_vendor/distro/LICENSE
|
|
||||||
License-File: src/pip/_vendor/idna/LICENSE.md
|
|
||||||
License-File: src/pip/_vendor/msgpack/COPYING
|
|
||||||
License-File: src/pip/_vendor/packaging/LICENSE
|
|
||||||
License-File: src/pip/_vendor/packaging/LICENSE.APACHE
|
|
||||||
License-File: src/pip/_vendor/packaging/LICENSE.BSD
|
|
||||||
License-File: src/pip/_vendor/pkg_resources/LICENSE
|
|
||||||
License-File: src/pip/_vendor/platformdirs/LICENSE
|
|
||||||
License-File: src/pip/_vendor/pygments/LICENSE
|
|
||||||
License-File: src/pip/_vendor/pyproject_hooks/LICENSE
|
|
||||||
License-File: src/pip/_vendor/requests/LICENSE
|
|
||||||
License-File: src/pip/_vendor/resolvelib/LICENSE
|
|
||||||
License-File: src/pip/_vendor/rich/LICENSE
|
|
||||||
License-File: src/pip/_vendor/tomli/LICENSE
|
|
||||||
License-File: src/pip/_vendor/tomli_w/LICENSE
|
|
||||||
License-File: src/pip/_vendor/truststore/LICENSE
|
|
||||||
License-File: src/pip/_vendor/urllib3/LICENSE.txt
|
|
||||||
Project-URL: Changelog, https://pip.pypa.io/en/stable/news/
|
|
||||||
Project-URL: Documentation, https://pip.pypa.io
|
|
||||||
Project-URL: Homepage, https://pip.pypa.io/
|
|
||||||
Project-URL: Source, https://github.com/pypa/pip
|
|
||||||
|
|
||||||
pip - The Python Package Installer
|
|
||||||
==================================
|
|
||||||
|
|
||||||
.. |pypi-version| image:: https://img.shields.io/pypi/v/pip.svg
|
|
||||||
:target: https://pypi.org/project/pip/
|
|
||||||
:alt: PyPI
|
|
||||||
|
|
||||||
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/pip
|
|
||||||
:target: https://pypi.org/project/pip
|
|
||||||
:alt: PyPI - Python Version
|
|
||||||
|
|
||||||
.. |docs-badge| image:: https://readthedocs.org/projects/pip/badge/?version=latest
|
|
||||||
:target: https://pip.pypa.io/en/latest
|
|
||||||
:alt: Documentation
|
|
||||||
|
|
||||||
|pypi-version| |python-versions| |docs-badge|
|
|
||||||
|
|
||||||
pip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.
|
|
||||||
|
|
||||||
Please take a look at our documentation for how to install and use pip:
|
|
||||||
|
|
||||||
* `Installation`_
|
|
||||||
* `Usage`_
|
|
||||||
|
|
||||||
We release updates regularly, with a new version every 3 months. Find more details in our documentation:
|
|
||||||
|
|
||||||
* `Release notes`_
|
|
||||||
* `Release process`_
|
|
||||||
|
|
||||||
If you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:
|
|
||||||
|
|
||||||
* `Issue tracking`_
|
|
||||||
* `Discourse channel`_
|
|
||||||
* `User IRC`_
|
|
||||||
|
|
||||||
If you want to get involved, head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:
|
|
||||||
|
|
||||||
* `GitHub page`_
|
|
||||||
* `Development documentation`_
|
|
||||||
* `Development IRC`_
|
|
||||||
|
|
||||||
Code of Conduct
|
|
||||||
---------------
|
|
||||||
|
|
||||||
Everyone interacting in the pip project's codebases, issue trackers, chat
|
|
||||||
rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
|
|
||||||
|
|
||||||
.. _package installer: https://packaging.python.org/guides/tool-recommendations/
|
|
||||||
.. _Python Package Index: https://pypi.org
|
|
||||||
.. _Installation: https://pip.pypa.io/en/stable/installation/
|
|
||||||
.. _Usage: https://pip.pypa.io/en/stable/
|
|
||||||
.. _Release notes: https://pip.pypa.io/en/stable/news.html
|
|
||||||
.. _Release process: https://pip.pypa.io/en/latest/development/release-process/
|
|
||||||
.. _GitHub page: https://github.com/pypa/pip
|
|
||||||
.. _Development documentation: https://pip.pypa.io/en/latest/development
|
|
||||||
.. _Issue tracking: https://github.com/pypa/pip/issues
|
|
||||||
.. _Discourse channel: https://discuss.python.org/c/packaging
|
|
||||||
.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
|
|
||||||
.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
|
|
||||||
.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
|
|
||||||
|
|
||||||
@@ -1,956 +0,0 @@
|
|||||||
pip/__init__.py,sha256=3EhKF2588Ab15tmBszgD3Bp0N26sJx7VhS2Akn_qY38,355
|
|
||||||
pip/__main__.py,sha256=WzbhHXTbSE6gBY19mNN9m4s5o_365LOvTYSgqgbdBhE,854
|
|
||||||
pip/__pip-runner__.py,sha256=JOoEZTwrtv7jRaXBkgSQKAE04yNyfFmGHxqpHiGHvL0,1450
|
|
||||||
pip/py.typed,sha256=EBVvvPRTn_eIpz5e5QztSCdrMX7Qwd7VP93RSoIlZ2I,286
|
|
||||||
pip/_internal/__init__.py,sha256=S7i9Dn9aSZS0MG-2Wrve3dV9TImPzvQn5jjhp9t_uf0,511
|
|
||||||
pip/_internal/build_env.py,sha256=XpgOIlTQLgz3PvDT2n7j2NzX_rVFZLCIG7t7b2ddhcM,21911
|
|
||||||
pip/_internal/cache.py,sha256=nMh48Yv3yu1HS1yCdscouu6B6B5zYBWdV6bhqs7gL-E,10345
|
|
||||||
pip/_internal/configuration.py,sha256=WxwwSwY_Bm6QzDgf32BsujEyO8dgRedegCpgbUfDvM8,14568
|
|
||||||
pip/_internal/exceptions.py,sha256=JdPCrQ9iTLvE-GBebzBEeGP3hoTffWEKqbYEsa6cEZc,32165
|
|
||||||
pip/_internal/main.py,sha256=1cHqjsfFCrMFf3B5twzocxTJUdHMLoXUpy5lJoFqUi8,338
|
|
||||||
pip/_internal/pyproject.py,sha256=J-sTWqC-XfsKQgz9m1bypMWZPHItsSHzIN_NWeIRmhM,4555
|
|
||||||
pip/_internal/self_outdated_check.py,sha256=zDKsyLMufFHuEZY16WRu129FBbBp-ADuxyWMIN4ihPE,8284
|
|
||||||
pip/_internal/wheel_builder.py,sha256=yvEULStZtty9Kplp89tDis3hGdyKQ-2BUbFLmJ_5ink,9010
|
|
||||||
pip/_internal/cli/__init__.py,sha256=Iqg_tKA771XuMO1P4t_sDHnSKPzkUb9D0DqunAmw_ko,131
|
|
||||||
pip/_internal/cli/autocompletion.py,sha256=ZG2cM03nlcNrs-WG_SFTW46isx9s2Go5lUD_8-iv70o,7193
|
|
||||||
pip/_internal/cli/base_command.py,sha256=6OW75PSGzkH8Fz761WZ3OSz1TsuO3-suc6iap-sQjTM,9168
|
|
||||||
pip/_internal/cli/cmdoptions.py,sha256=hfA9B29Nnq2vYMWhFVg7EcWjdlfdPBPU4WwWT2Lkq4A,36164
|
|
||||||
pip/_internal/cli/command_context.py,sha256=kmu3EWZbfBega1oDamnGJTA_UaejhIQNuMj2CVmMXu0,817
|
|
||||||
pip/_internal/cli/index_command.py,sha256=s3x75lpDXWJtCkBacTQ3qAAprldHMJCniEQ5qkQ0FiI,6484
|
|
||||||
pip/_internal/cli/main.py,sha256=ljDQBkvBtC8xTjOdb6rDJzJUNi1s-PnVR_W5C-Mq0Dk,3137
|
|
||||||
pip/_internal/cli/main_parser.py,sha256=YjzJAjqf78ARNsLlnJT9l6fNbpyDPJA-arOIXYsK5Ik,4403
|
|
||||||
pip/_internal/cli/parser.py,sha256=EIFExrWX_1nrl1Ib--GOor70WYqLtduHByenb1u9xH4,13827
|
|
||||||
pip/_internal/cli/progress_bars.py,sha256=IW1PH5n2FPqUBTP7ULQ5Yu-wyNNO9XGY3g1PT4RMu44,4706
|
|
||||||
pip/_internal/cli/req_command.py,sha256=QjDXId0hFdopwE8hNx2eustumxUNbnOCvG_ORmUC7vM,16482
|
|
||||||
pip/_internal/cli/spinners.py,sha256=EJzZIZNyUtJljp3-WjcsyIrqxW-HUsfWzhuW84n_Tqw,7362
|
|
||||||
pip/_internal/cli/status_codes.py,sha256=sEFHUaUJbqv8iArL3HAtcztWZmGOFX01hTesSytDEh0,116
|
|
||||||
pip/_internal/commands/__init__.py,sha256=aNeCbQurGWihfhQq7BqaLXHqWDQ0i3I04OS7kxK6plQ,4026
|
|
||||||
pip/_internal/commands/cache.py,sha256=XjT7kjY8GSISMksFHsLvjS9Ogfi5extNlUUv-dUoWCM,9142
|
|
||||||
pip/_internal/commands/check.py,sha256=hVFBQezQ3zj4EydoWbFQj_afPUppMt7r9JPAlY22U6Y,2244
|
|
||||||
pip/_internal/commands/completion.py,sha256=LjvRIZ6QUiDXJL3IOMFeD-_J97HfjMGgEk0j2tWGu1U,4565
|
|
||||||
pip/_internal/commands/configuration.py,sha256=6gNOGrVWnOLU15zUnAiNuOMhf76RRIZvCdVD0degPRk,10105
|
|
||||||
pip/_internal/commands/debug.py,sha256=_8IqM8Fx1_lY2STu_qspr63tufF7zyFJCyYAXtxz0N4,6805
|
|
||||||
pip/_internal/commands/download.py,sha256=LUNVobuvCdagjLBuPBaxHeBiHEiIe03fTO2m6ahC8qw,5178
|
|
||||||
pip/_internal/commands/freeze.py,sha256=fxoW8AAc-bAqB_fXdNq2VnZ3JfWkFMg-bR6LcdDVO7A,3099
|
|
||||||
pip/_internal/commands/hash.py,sha256=GO9pRN3wXC2kQaovK57TaLYBMc3IltOH92O6QEw6YE0,1679
|
|
||||||
pip/_internal/commands/help.py,sha256=Bz3LcjNQXkz4Cu__pL4CZ86o4-HNLZj1NZWdlJhjuu0,1108
|
|
||||||
pip/_internal/commands/index.py,sha256=kDpx2MO6ZxTt5PpeY4jqcssVbYhzxpkpreDe_6PPhks,5520
|
|
||||||
pip/_internal/commands/inspect.py,sha256=ogm4UT7LRo8bIQcWUS1IiA25QdD4VHLa7JaPAodDttM,3177
|
|
||||||
pip/_internal/commands/install.py,sha256=L6X1qi49ROVTGABhwwxDgBBTijlOpVn6XSDVZ7QW1Kc,30588
|
|
||||||
pip/_internal/commands/list.py,sha256=L5nWuwawqSrBNsuxfyHLAagfz7XJP86tC9nK3L9YiI8,13497
|
|
||||||
pip/_internal/commands/lock.py,sha256=145ihjUK_-7gP8O65XPDi_xMhlh5hne1ptkHdfnbAnQ,6027
|
|
||||||
pip/_internal/commands/search.py,sha256=zbMsX_YASj6kXA6XIBgTDv0bGK51xG-CV3IynZJcE-c,5782
|
|
||||||
pip/_internal/commands/show.py,sha256=oLVJIfKWmDKm0SsQGEi3pozNiqrXjTras_fbBSYKpBA,8066
|
|
||||||
pip/_internal/commands/uninstall.py,sha256=CsOihqvb6ZA6O67L70oXeoLHeOfNzMM88H9g-9aocgw,3868
|
|
||||||
pip/_internal/commands/wheel.py,sha256=L9vEzJ_E42scF_Hgh5X4Hk39nqJDKxGg4u7glDYbNWc,5880
|
|
||||||
pip/_internal/distributions/__init__.py,sha256=Hq6kt6gXBgjNit5hTTWLAzeCNOKoB-N0pGYSqehrli8,858
|
|
||||||
pip/_internal/distributions/base.py,sha256=l-OTCAIs25lsapejA6IYpPZxSM5-BET4sdZDkql8jiY,1830
|
|
||||||
pip/_internal/distributions/installed.py,sha256=kgIEE_1NzjZxLBSC-v5s64uOFZlVEt3aPrjTtL6x2XY,929
|
|
||||||
pip/_internal/distributions/sdist.py,sha256=RYwQIbuxpKy6OjlBZCAefxpMDaoocUQ4dFtheGsiTOQ,6627
|
|
||||||
pip/_internal/distributions/wheel.py,sha256=_HbG0OehF8dwj4UX-xV__tXLwgPus9OjMEf2NTRqBbE,1364
|
|
||||||
pip/_internal/index/__init__.py,sha256=tzwMH_fhQeubwMqHdSivasg1cRgTSbNg2CiMVnzMmyU,29
|
|
||||||
pip/_internal/index/collector.py,sha256=R7Gcx_4GEoSEI-iazfAZVEPG3Lp6mbZT4lbAD6NjAc0,16144
|
|
||||||
pip/_internal/index/package_finder.py,sha256=a3_L4FDNsuDf3y8Af9J7sfsHR1ahs8o13Ths-WYwFh0,41776
|
|
||||||
pip/_internal/index/sources.py,sha256=nXJkOjhLy-O2FsrKU9RIqCOqgY2PsoKWybtZjjRgqU0,8639
|
|
||||||
pip/_internal/locations/__init__.py,sha256=Sd67ap1LIemvXArUDFqm8U-HuZvj9i3ApEuiIwUc9UE,14157
|
|
||||||
pip/_internal/locations/_distutils.py,sha256=jpFj4V00rD9IR3vA9TqrGkwcdNVFc58LsChZavge9JY,5975
|
|
||||||
pip/_internal/locations/_sysconfig.py,sha256=8CpTjtxaCzHSCrKpaxWnHE7aKcJrRJRmntR1ZLVysLk,7779
|
|
||||||
pip/_internal/locations/base.py,sha256=AImjYJWxOtDkc0KKc6Y4Gz677cg91caMA4L94B9FZEg,2550
|
|
||||||
pip/_internal/metadata/__init__.py,sha256=vp-JAxiWg_-l5F8AT0Jcey72uUnh8CDwwol9-KktHZ8,5824
|
|
||||||
pip/_internal/metadata/_json.py,sha256=hNvnMHOXLAyNlzirWhPL9Nx2CvCqa1iRma6Osq1YfV8,2711
|
|
||||||
pip/_internal/metadata/base.py,sha256=BGuMenlcQT8i7j9iclrfdC3vSwgvhr8gjn955cCy16s,25420
|
|
||||||
pip/_internal/metadata/pkg_resources.py,sha256=NO76ZrfR2-LKJTyaXrmQoGhmJMArALvacrlZHViSDT8,10544
|
|
||||||
pip/_internal/metadata/importlib/__init__.py,sha256=jUUidoxnHcfITHHaAWG1G2i5fdBYklv_uJcjo2x7VYE,135
|
|
||||||
pip/_internal/metadata/importlib/_compat.py,sha256=sneVh4_6WxQZK4ljdl3ylVuP-q0ttSqbgl9mWt0HnOg,2804
|
|
||||||
pip/_internal/metadata/importlib/_dists.py,sha256=znZD7MN4RC73-87KXAn6tKZv9lAQRI0AxxK2bubDvPw,8420
|
|
||||||
pip/_internal/metadata/importlib/_envs.py,sha256=H3qVLXVh4LWvrPvu_ekXf3dfbtwnlhNJQP2pxXpccfU,5333
|
|
||||||
pip/_internal/models/__init__.py,sha256=AjmCEBxX_MH9f_jVjIGNCFJKYCYeSEe18yyvNx4uRKQ,62
|
|
||||||
pip/_internal/models/candidate.py,sha256=zzgFRuw_kWPjKpGw7LC0ZUMD2CQ2EberUIYs8izjdCA,753
|
|
||||||
pip/_internal/models/direct_url.py,sha256=4NMWacu_QzPPWREC1te7v6Wfv-2HkI4tvSJF-CBgLh4,6555
|
|
||||||
pip/_internal/models/format_control.py,sha256=PwemYG1L27BM0f1KP61rm24wShENFyxqlD1TWu34alc,2471
|
|
||||||
pip/_internal/models/index.py,sha256=tYnL8oxGi4aSNWur0mG8DAP7rC6yuha_MwJO8xw0crI,1030
|
|
||||||
pip/_internal/models/installation_report.py,sha256=cqfWJ93ThCxjcacqSWryOCD2XtIn1CZrgzZxAv5FQZ0,2839
|
|
||||||
pip/_internal/models/link.py,sha256=zti5UCx1hT03etYqm6MCqFd714clmTgX8rTZT9CKZDQ,21992
|
|
||||||
pip/_internal/models/release_control.py,sha256=XD14Hy_XLh9xWR1p7JHqPZPEv3Nnb1BZGMpClk76sLs,3403
|
|
||||||
pip/_internal/models/scheme.py,sha256=PakmHJM3e8OOWSZFtfz1Az7f1meONJnkGuQxFlt3wBE,575
|
|
||||||
pip/_internal/models/search_scope.py,sha256=1hxU2IVsAaLZVjp0CbzJbYaYzCxv72_Qbg3JL0qhXo0,4507
|
|
||||||
pip/_internal/models/selection_prefs.py,sha256=IDOA3euRtyqWUyIK7lX2bzIZasYiEvunKA6H3Mngk-M,2221
|
|
||||||
pip/_internal/models/target_python.py,sha256=I0eFS-eia3kwhrOvgsphFZtNAB2IwXZ9Sr9fp6IjBP4,4243
|
|
||||||
pip/_internal/models/wheel.py,sha256=1SdfDvN7ALTsbyZ9EOsNy1GPirP1n6EjHyzPrZyLSh8,2920
|
|
||||||
pip/_internal/network/__init__.py,sha256=FMy06P__y6jMjUc8z3ZcQdKF-pmZ2zM14_vBeHPGhUI,49
|
|
||||||
pip/_internal/network/auth.py,sha256=azFp14I9cyWAAzkxF2VM0Q_xtHnbNz3_NQXszy87KQo,20806
|
|
||||||
pip/_internal/network/cache.py,sha256=kmRXKQrG9E26xQRj211LHeEGpDg_SlYU9Dn1fJ-AMeI,4862
|
|
||||||
pip/_internal/network/download.py,sha256=8sVwIc9MWwpGlMPYCkO1S9U-FD8TA2utw42tj00skjM,12667
|
|
||||||
pip/_internal/network/lazy_wheel.py,sha256=y9gVksdJCSjnLfYzs_m3DYUAtl3hc_k-xFPDBd9DgOs,7646
|
|
||||||
pip/_internal/network/session.py,sha256=7zK7EeQCSRFipu4ZzcWl1V3AMKkiXdtGqFr7GvU2LrY,19555
|
|
||||||
pip/_internal/network/utils.py,sha256=ACsXd1msqNCidHVXsu7LHUSr8NgaypcOKQ4KG-Z_wJM,4091
|
|
||||||
pip/_internal/network/xmlrpc.py,sha256=_-Rnk3vOff8uF9hAGmT6SLALflY1gMBcbGwS12fb_Y4,1830
|
|
||||||
pip/_internal/operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_internal/operations/check.py,sha256=yC2XWth6iehGGE_fj7XRJLjVKBsTIG3ZoWRkFi3rOwc,5894
|
|
||||||
pip/_internal/operations/freeze.py,sha256=PDdY-y_ZtZZJLAKcaWPIGRKAGW7DXR48f0aMRU0j7BA,9854
|
|
||||||
pip/_internal/operations/prepare.py,sha256=ptVsmQf0Mo6jirk1Q5Djdse_wJw5Zdh1Fla2iL9HAJM,28830
|
|
||||||
pip/_internal/operations/build/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_internal/operations/build/build_tracker.py,sha256=W3b5cmkMWPaE6QIwfzsTayJo7-OlxFHWDxfPuax1KcE,4771
|
|
||||||
pip/_internal/operations/build/metadata.py,sha256=INHaeiRfOiLYCXApfDNRo9Cw2xI4VwTc0KItvfdfOjk,1421
|
|
||||||
pip/_internal/operations/build/metadata_editable.py,sha256=oWudMsnjy4loO_Jy7g4N9nxsnaEX_iDlVRgCy7pu1rs,1509
|
|
||||||
pip/_internal/operations/build/wheel.py,sha256=3bP-nNiJ4S8JvMaBnyessXQUBhxTqt1GBx6DQ1iPJDY,1136
|
|
||||||
pip/_internal/operations/build/wheel_editable.py,sha256=q3kfElclM6FutVbFwE87JOTpVWt5ixDf3_UkHAIVfz4,1478
|
|
||||||
pip/_internal/operations/install/__init__.py,sha256=ak-UETcQPKlFZaWoYKWu5QVXbpFBvg0sXc3i0O4vSYY,50
|
|
||||||
pip/_internal/operations/install/wheel.py,sha256=FQIl2AnNadHV5YGGOVEmOHtUUNO8lpzj3Icoo4S2xis,27923
|
|
||||||
pip/_internal/req/__init__.py,sha256=WcY9z7D3rlIKX1QY8_tRnAsS_poebiGGdtQ7EJ5JQQo,3041
|
|
||||||
pip/_internal/req/constructors.py,sha256=R-6n8irjnaa2DMMXlR4YMouXzykFBlzUFjhOZ1NcUUg,18688
|
|
||||||
pip/_internal/req/pep723.py,sha256=olZL3tLmHWJhyLNfbD6U9UuikuzTcLDB06qd9WavTjs,1225
|
|
||||||
pip/_internal/req/req_dependency_group.py,sha256=0yEQCUaO5Bza66Y3D5o9JRf0qII5QgCRugn1x5aRivA,2618
|
|
||||||
pip/_internal/req/req_file.py,sha256=e32ZQ3kJaL_Sdtf32twGKqIau_AqR43MeSycl0iS2Mw,20685
|
|
||||||
pip/_internal/req/req_install.py,sha256=vv5cbs3P5gf43e_1v72gwSQ2N_D_qpsfuXOyerMhDuI,31273
|
|
||||||
pip/_internal/req/req_set.py,sha256=awkqIXnYA4Prmsj0Qb3zhqdbYUmXd-1o0P-KZ3mvRQs,2828
|
|
||||||
pip/_internal/req/req_uninstall.py,sha256=dCmOHt-9RaJBq921L4tMH3PmIBDetGplnbjRKXmGt00,24099
|
|
||||||
pip/_internal/resolution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_internal/resolution/base.py,sha256=RIsqSP79olPdOgtPKW-oOQ364ICVopehA6RfGkRfe2s,577
|
|
||||||
pip/_internal/resolution/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_internal/resolution/legacy/resolver.py,sha256=bwUqE66etz2bcPabqxed18-iyqqb-kx3Er2aT6GeUJY,24060
|
|
||||||
pip/_internal/resolution/resolvelib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_internal/resolution/resolvelib/base.py,sha256=_AoP0ZWlaSct8CRDn2ol3CbNn4zDtnh_0zQGjXASDKI,5047
|
|
||||||
pip/_internal/resolution/resolvelib/candidates.py,sha256=50AN7BfB-pCfEmbKNlFZSXtdC0C8ms1waJrF2arknQE,20454
|
|
||||||
pip/_internal/resolution/resolvelib/factory.py,sha256=82mLwnPlig37mMrDwcgKHJTE9mPczVuJIxeaUb7CQ0Y,34028
|
|
||||||
pip/_internal/resolution/resolvelib/found_candidates.py,sha256=8bZYDCZLXSdLHy_s1o5f4r15HmKvqFUhzBUQOF21Lr4,6018
|
|
||||||
pip/_internal/resolution/resolvelib/provider.py,sha256=tbVPfFv4Vg780yZ2_XGoGFP5LVo0U2bFnZov3jpSAIk,11441
|
|
||||||
pip/_internal/resolution/resolvelib/reporter.py,sha256=faSgjqme0k_uzv1fvM5T0ZatPQ2eEktNvKBqfvXeGjc,3909
|
|
||||||
pip/_internal/resolution/resolvelib/requirements.py,sha256=Izl9n8nc188lA1BSPS8QxfudfDQPHgngw-ij6hXt0nQ,8239
|
|
||||||
pip/_internal/resolution/resolvelib/resolver.py,sha256=wQ94Hkep-7kWEHAc-NbMJhmzeEzgEAtxeBxyKVzZoeo,13437
|
|
||||||
pip/_internal/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_internal/utils/_jaraco_text.py,sha256=M15uUPIh5NpP1tdUGBxRau6q1ZAEtI8-XyLEETscFfE,3350
|
|
||||||
pip/_internal/utils/_log.py,sha256=-jHLOE_THaZz5BFcCnoSL9EYAtJ0nXem49s9of4jvKw,1015
|
|
||||||
pip/_internal/utils/appdirs.py,sha256=LrzDPZMKVh0rubtCx9vu3XlZbLCSug6VSj4Qsvt66BA,1681
|
|
||||||
pip/_internal/utils/compat.py,sha256=C9LHXJAKkwAH8Hn3nPkz9EYK3rqPBeO_IXkOG2zzsdQ,2514
|
|
||||||
pip/_internal/utils/compatibility_tags.py,sha256=DiNSLqpuruXUamGQwOJ2WZByDGLTGaXi9O-Xf8fOi34,6630
|
|
||||||
pip/_internal/utils/datetime.py,sha256=kuJOf1mW8G5tRFN6jWardddS-9qSaR53lK1jmx3NTZY,868
|
|
||||||
pip/_internal/utils/deprecation.py,sha256=HVhvyO5qiRFcG88PhZlp_87qdKQNwPTUIIHWtsTR2yI,3696
|
|
||||||
pip/_internal/utils/direct_url_helpers.py,sha256=ttKv4GMUqlRwPPog9_CUopy6SDgoxVILzeBJzgfn2tg,3200
|
|
||||||
pip/_internal/utils/egg_link.py,sha256=YWfsrbmfcrfWgqQYy6OuIjsyb9IfL1q_2v4zsms1WjI,2459
|
|
||||||
pip/_internal/utils/entrypoints.py,sha256=uPjAyShKObdotjQjJUzprQ6r3xQvDIZwUYfHHqZ7Dok,3324
|
|
||||||
pip/_internal/utils/filesystem.py,sha256=mJ_PP8z1V1x4HMhydWIWDyEmWikLX0f-NXPCXEcjiLo,6892
|
|
||||||
pip/_internal/utils/filetypes.py,sha256=sEMa38qaqjvx1Zid3OCAUja31BOBU-USuSMPBvU3yjo,689
|
|
||||||
pip/_internal/utils/glibc.py,sha256=sEh8RJJLYSdRvTqAO4THVPPA-YSDVLD4SI9So-bxX1U,3726
|
|
||||||
pip/_internal/utils/hashes.py,sha256=d32UI1en8nyqZzdZQvxUVdfeBoe4ADWx7HtrIM4-XQ4,4998
|
|
||||||
pip/_internal/utils/logging.py,sha256=6lJWMC6c7_aD_i4sdgaaeb-Tm3kWpYg0hba_V1-OLnE,13414
|
|
||||||
pip/_internal/utils/misc.py,sha256=phFIbHm2kmliHDXJ0eNPxgGP423ZpvZoMKKtJ1_Zvjs,23722
|
|
||||||
pip/_internal/utils/packaging.py,sha256=s5tpUmFumwV0H9JSTzryrIY4JwQM8paGt7Sm7eNwt2Y,1601
|
|
||||||
pip/_internal/utils/pylock.py,sha256=nKQknZgyswWgzi--hRQX_DLUYQ3g5wGTCwVNQNdoJ54,3817
|
|
||||||
pip/_internal/utils/retry.py,sha256=83wReEB2rcntMZ5VLd7ascaYSjn_kLdlQCqxILxWkPM,1461
|
|
||||||
pip/_internal/utils/subprocess.py,sha256=r4-Ba_Yc3uZXQpi0K4pZFsCT_QqdSvtF3XJ-204QWaA,8983
|
|
||||||
pip/_internal/utils/temp_dir.py,sha256=D9c8D7WOProOO8GGDqpBeVSj10NGFmunG0o2TodjjIU,9307
|
|
||||||
pip/_internal/utils/unpacking.py,sha256=4hNg6dqHOn_KzGCzSC76nChG97d_UjtF9AnLSof672o,12972
|
|
||||||
pip/_internal/utils/urls.py,sha256=aF_eg9ul5d8bMCxfSSSxQcfs-OpJdbStYqZHoy2K1RE,1601
|
|
||||||
pip/_internal/utils/virtualenv.py,sha256=mX-UPyw1MPxhwUxKhbqWWX70J6PHXAJjVVrRnG0h9mc,3455
|
|
||||||
pip/_internal/utils/wheel.py,sha256=YdRuj6MicG-Q9Mg03FbUv1WTLam6Lc7AgijY4voVyis,4468
|
|
||||||
pip/_internal/vcs/__init__.py,sha256=UAqvzpbi0VbZo3Ub6skEeZAw-ooIZR-zX_WpCbxyCoU,596
|
|
||||||
pip/_internal/vcs/bazaar.py,sha256=3W1eHjkYx2vc6boeb2NBh4I_rlGAXM-vrzfNhLm1Rxg,3734
|
|
||||||
pip/_internal/vcs/git.py,sha256=TTeqDuzS-_BFSNuUStVWmE2nGDpKuvUhBBJk_CCQXV0,19144
|
|
||||||
pip/_internal/vcs/mercurial.py,sha256=w1ZJWLKqNP1onEjkfjlwBVnMqPZNSIER8ayjQcnTq4w,5575
|
|
||||||
pip/_internal/vcs/subversion.py,sha256=uUgdPvxmvEB8Qwtjr0Hc0XgFjbiNi5cbvI4vARLOJXo,11787
|
|
||||||
pip/_internal/vcs/versioncontrol.py,sha256=Ma_HMZBVveSkeYvxacvqeujnkSIaF1XjxTsS3BwcJ8E,22599
|
|
||||||
pip/_vendor/README.rst,sha256=pKKBwCWhu3M3qQ9dDnsmxb3KdsRr-nWmMq2srbH_Bi0,9394
|
|
||||||
pip/_vendor/__init__.py,sha256=WzusPTGWIMeQQWSVJ0h2rafGkVTa9WKJ2HT-2-EoZrU,4907
|
|
||||||
pip/_vendor/vendor.txt,sha256=f2msFLZ-chXWIZSKW31NLGyMWmt_-Vfy7sY5dHYgmnw,342
|
|
||||||
pip/_vendor/cachecontrol/LICENSE.txt,sha256=hu7uh74qQ_P_H1ZJb0UfaSQ5JvAl_tuwM2ZsMExMFhs,558
|
|
||||||
pip/_vendor/cachecontrol/__init__.py,sha256=GxwRkm_TQBtPZpfpVK9r6S9dAy2DVnVgDVHJKTiPZ1k,820
|
|
||||||
pip/_vendor/cachecontrol/_cmd.py,sha256=iist2EpzJvDVIhMAxXq8iFnTBsiZAd6iplxfmNboNyk,1737
|
|
||||||
pip/_vendor/cachecontrol/adapter.py,sha256=W-HW-l01gyCsnxkOyCbqx7sxrWYoBbKrDsKkVVQN6NE,6586
|
|
||||||
pip/_vendor/cachecontrol/cache.py,sha256=OXwv7Fn2AwnKNiahJHnjtvaKLndvVLv_-zO-ltlV9qI,1953
|
|
||||||
pip/_vendor/cachecontrol/controller.py,sha256=xBauC-vUSu5GsJsxD4-W-JaKqqbBz0MN6Zv8PA2N8hI,19102
|
|
||||||
pip/_vendor/cachecontrol/filewrapper.py,sha256=DhxC_rSk-beKdbsYhfvBUDovQHX9r3gHH_jP9-q_mKk,4354
|
|
||||||
pip/_vendor/cachecontrol/heuristics.py,sha256=gqMXU8w0gQuEQiSdu3Yg-0vd9kW7nrWKbLca75rheGE,4881
|
|
||||||
pip/_vendor/cachecontrol/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/cachecontrol/serialize.py,sha256=HQd2IllQ05HzPkVLMXTF2uX5mjEQjDBkxCqUJUODpZk,5163
|
|
||||||
pip/_vendor/cachecontrol/wrapper.py,sha256=hsGc7g8QGQTT-4f8tgz3AM5qwScg6FO0BSdLSRdEvpU,1417
|
|
||||||
pip/_vendor/cachecontrol/caches/__init__.py,sha256=dtrrroK5BnADR1GWjCZ19aZ0tFsMfvFBtLQQU1sp_ag,303
|
|
||||||
pip/_vendor/cachecontrol/caches/file_cache.py,sha256=d8upFmy_zwaCmlbWEVBlLXFddt8Zw8c5SFpxeOZsdfw,4117
|
|
||||||
pip/_vendor/cachecontrol/caches/redis_cache.py,sha256=9rmqwtYu_ljVkW6_oLqbC7EaX_a8YT_yLuna-eS0dgo,1386
|
|
||||||
pip/_vendor/certifi/LICENSE,sha256=6TcW2mucDVpKHfYP5pWzcPBpVgPSH2-D8FPkLPwQyvc,989
|
|
||||||
pip/_vendor/certifi/__init__.py,sha256=969deMMS7Uchipr0oO4dbRBUvRi0uNYCn07VmG1aTrg,94
|
|
||||||
pip/_vendor/certifi/__main__.py,sha256=1k3Cr95vCxxGRGDljrW3wMdpZdL3Nhf0u1n-k2qdsCY,255
|
|
||||||
pip/_vendor/certifi/cacert.pem,sha256=Tzl1_zCrvzVEO0hgZK6Ly0Hf9wf_31dsdtKS-0WKoKk,270954
|
|
||||||
pip/_vendor/certifi/core.py,sha256=gu_ECVI1m3Rq0ytpsNE61hgQGcKaOAt9Rs9G8KsTCOI,3442
|
|
||||||
pip/_vendor/certifi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/dependency_groups/LICENSE.txt,sha256=GrNuPipLqGMWJThPh-ngkdsfrtA0xbIzJbMjmr8sxSU,1099
|
|
||||||
pip/_vendor/dependency_groups/__init__.py,sha256=C3OFu0NGwDzQ4LOmmSOFPsRSvkbBn-mdd4j_5YqJw-s,250
|
|
||||||
pip/_vendor/dependency_groups/__main__.py,sha256=UNTM7P5mfVtT7wDi9kOTXWgV3fu3e8bTrt1Qp1jvjKo,1709
|
|
||||||
pip/_vendor/dependency_groups/_implementation.py,sha256=Gqb2DlQELRakeHlKf6QtQSW0M-bcEomxHw4JsvID1ls,8041
|
|
||||||
pip/_vendor/dependency_groups/_lint_dependency_groups.py,sha256=yp-DDqKXtbkDTNa0ifa-FmOA8ra24lPZEXftW-R5AuI,1710
|
|
||||||
pip/_vendor/dependency_groups/_pip_wrapper.py,sha256=nuVW_w_ntVxpE26ELEvngMY0N04sFLsijXRyZZROFG8,1865
|
|
||||||
pip/_vendor/dependency_groups/_toml_compat.py,sha256=BHnXnFacm3DeolsA35GjI6qkDApvua-1F20kv3BfZWE,285
|
|
||||||
pip/_vendor/dependency_groups/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/distlib/LICENSE.txt,sha256=gI4QyKarjesUn_mz-xn0R6gICUYG1xKpylf-rTVSWZ0,14531
|
|
||||||
pip/_vendor/distlib/__init__.py,sha256=Deo3uo98aUyIfdKJNqofeSEFWwDzrV2QeGLXLsgq0Ag,625
|
|
||||||
pip/_vendor/distlib/compat.py,sha256=2jRSjRI4o-vlXeTK2BCGIUhkc6e9ZGhSsacRM5oseTw,41467
|
|
||||||
pip/_vendor/distlib/resources.py,sha256=LwbPksc0A1JMbi6XnuPdMBUn83X7BPuFNWqPGEKI698,10820
|
|
||||||
pip/_vendor/distlib/scripts.py,sha256=Qvp76E9Jc3IgyYubnpqI9fS7eseGOe4FjpeVKqKt9Iw,18612
|
|
||||||
pip/_vendor/distlib/t32.exe,sha256=a0GV5kCoWsMutvliiCKmIgV98eRZ33wXoS-XrqvJQVs,97792
|
|
||||||
pip/_vendor/distlib/t64-arm.exe,sha256=68TAa32V504xVBnufojh0PcenpR3U4wAqTqf-MZqbPw,182784
|
|
||||||
pip/_vendor/distlib/t64.exe,sha256=gaYY8hy4fbkHYTTnA4i26ct8IQZzkBG2pRdy0iyuBrc,108032
|
|
||||||
pip/_vendor/distlib/util.py,sha256=vMPGvsS4j9hF6Y9k3Tyom1aaHLb0rFmZAEyzeAdel9w,66682
|
|
||||||
pip/_vendor/distlib/w32.exe,sha256=R4csx3-OGM9kL4aPIzQKRo5TfmRSHZo6QWyLhDhNBks,91648
|
|
||||||
pip/_vendor/distlib/w64-arm.exe,sha256=xdyYhKj0WDcVUOCb05blQYvzdYIKMbmJn2SZvzkcey4,168448
|
|
||||||
pip/_vendor/distlib/w64.exe,sha256=ejGf-rojoBfXseGLpya6bFTFPWRG21X5KvU8J5iU-K0,101888
|
|
||||||
pip/_vendor/distro/LICENSE,sha256=y16Ofl9KOYjhBjwULGDcLfdWBfTEZRXnduOspt-XbhQ,11325
|
|
||||||
pip/_vendor/distro/__init__.py,sha256=2fHjF-SfgPvjyNZ1iHh_wjqWdR_Yo5ODHwZC0jLBPhc,981
|
|
||||||
pip/_vendor/distro/__main__.py,sha256=bu9d3TifoKciZFcqRBuygV3GSuThnVD_m2IK4cz96Vs,64
|
|
||||||
pip/_vendor/distro/distro.py,sha256=XqbefacAhDT4zr_trnbA15eY8vdK4GTghgmvUGrEM_4,49430
|
|
||||||
pip/_vendor/distro/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/idna/LICENSE.md,sha256=t6M2q_OwThgOwGXN0W5wXQeeHMehT5EKpukYfza5zYc,1541
|
|
||||||
pip/_vendor/idna/__init__.py,sha256=MPqNDLZbXqGaNdXxAFhiqFPKEQXju2jNQhCey6-5eJM,868
|
|
||||||
pip/_vendor/idna/codec.py,sha256=M2SGWN7cs_6B32QmKTyTN6xQGZeYQgQ2wiX3_DR6loE,3438
|
|
||||||
pip/_vendor/idna/compat.py,sha256=RzLy6QQCdl9784aFhb2EX9EKGCJjg0P3PilGdeXXcx8,316
|
|
||||||
pip/_vendor/idna/core.py,sha256=P26_XVycuMTZ1R2mNK1ZREVzM5mvTzdabBXfyZVU1Lc,13246
|
|
||||||
pip/_vendor/idna/idnadata.py,sha256=SG8jhaGE53iiD6B49pt2pwTv_UvClciWE-N54oR2p4U,79623
|
|
||||||
pip/_vendor/idna/intranges.py,sha256=amUtkdhYcQG8Zr-CoMM_kVRacxkivC1WgxN1b63KKdU,1898
|
|
||||||
pip/_vendor/idna/package_data.py,sha256=_CUavOxobnbyNG2FLyHoN8QHP3QM9W1tKuw7eq9QwBk,21
|
|
||||||
pip/_vendor/idna/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/idna/uts46data.py,sha256=H9J35VkD0F9L9mKOqjeNGd2A-Va6FlPoz6Jz4K7h-ps,243725
|
|
||||||
pip/_vendor/msgpack/COPYING,sha256=SS3tuoXaWHL3jmCRvNH-pHTWYNNay03ulkuKqz8AdCc,614
|
|
||||||
pip/_vendor/msgpack/__init__.py,sha256=RA8gcqK17YpkxBnNwXJVa1oa2LygWDgfF1nA1NPw3mo,1109
|
|
||||||
pip/_vendor/msgpack/exceptions.py,sha256=dCTWei8dpkrMsQDcjQk74ATl9HsIBH0ybt8zOPNqMYc,1081
|
|
||||||
pip/_vendor/msgpack/ext.py,sha256=kteJv03n9tYzd5oo3xYopVTo4vRaAxonBQQJhXohZZo,5726
|
|
||||||
pip/_vendor/msgpack/fallback.py,sha256=0g1Pzp0vtmBEmJ5w9F3s_-JMVURP8RS4G1cc5TRaAsI,32390
|
|
||||||
pip/_vendor/packaging/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
|
|
||||||
pip/_vendor/packaging/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
|
||||||
pip/_vendor/packaging/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
|
|
||||||
pip/_vendor/packaging/__init__.py,sha256=y4lVbpeBzCGk-IPDw5BGBZ_b0P3ukEEJZAbGYc6Ey8c,494
|
|
||||||
pip/_vendor/packaging/_elffile.py,sha256=-sKkptYqzYw2-x3QByJa5mB4rfPWu1pxkZHRx1WAFCY,3211
|
|
||||||
pip/_vendor/packaging/_manylinux.py,sha256=Hf6nB0cOrayEs96-p3oIXAgGnFquv20DO5l-o2_Xnv0,9559
|
|
||||||
pip/_vendor/packaging/_musllinux.py,sha256=Z6swjH3MA7XS3qXnmMN7QPhqP3fnoYI0eQ18e9-HgAE,2707
|
|
||||||
pip/_vendor/packaging/_parser.py,sha256=U_DajsEx2VoC_F46fSVV3hDKNCWoQYkPkasO3dld0ig,10518
|
|
||||||
pip/_vendor/packaging/_structures.py,sha256=Hn49Ta8zV9Wo8GiCL8Nl2ARZY983Un3pruZGVNldPwE,1514
|
|
||||||
pip/_vendor/packaging/_tokenizer.py,sha256=M8EwNIdXeL9NMFuFrQtiOKwjka_xFx8KjRQnfE8O_z8,5421
|
|
||||||
pip/_vendor/packaging/markers.py,sha256=ZX-cLvW1S3cZcEc0fHI4z7zSx5U2T19yMpDP_mE-CYw,12771
|
|
||||||
pip/_vendor/packaging/metadata.py,sha256=CWVZpN_HfoYMSSDuCP7igOvGgqA9AOmpW8f3qTisfnc,39360
|
|
||||||
pip/_vendor/packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/packaging/pylock.py,sha256=-R1uNfJ4PaLto7Mg62YsGOHgvskuiIEqPwxOywl42Jk,22537
|
|
||||||
pip/_vendor/packaging/requirements.py,sha256=PMCAWD8aNMnVD-6uZMedhBuAVX2573eZ4yPBLXmz04I,2870
|
|
||||||
pip/_vendor/packaging/specifiers.py,sha256=tF2nC-jwW94FYe6So9dNGenQx1Hdif7ErmWlVp1QiXE,40821
|
|
||||||
pip/_vendor/packaging/tags.py,sha256=cXLV1pJD3UtJlDg7Wz3zrfdQhRZqr8jumSAKKAAd2xE,22856
|
|
||||||
pip/_vendor/packaging/utils.py,sha256=N4c6oZzFJy6klTZ3AnkNz7sSkJesuFWPp68LA3B5dAo,5040
|
|
||||||
pip/_vendor/packaging/version.py,sha256=RVRKq8_GD5Bcak6E1kGG8K7siNZYW9n_XK8M2ZLl0H8,23284
|
|
||||||
pip/_vendor/packaging/licenses/__init__.py,sha256=TwXLHZCXwSgdFwRLPxW602T6mSieunSFHM6fp8pgW78,5819
|
|
||||||
pip/_vendor/packaging/licenses/_spdx.py,sha256=WW7DXiyg68up_YND_wpRYlr1SHhiV4FfJLQffghhMxQ,51122
|
|
||||||
pip/_vendor/pkg_resources/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
|
||||||
pip/_vendor/pkg_resources/__init__.py,sha256=vbTJ0_ruUgGxQjlEqsruFmiNPVyh2t9q-zyTDT053xI,124451
|
|
||||||
pip/_vendor/platformdirs/LICENSE,sha256=KeD9YukphQ6G6yjD_czwzv30-pSHkBHP-z0NS-1tTbY,1089
|
|
||||||
pip/_vendor/platformdirs/__init__.py,sha256=UfeSHWl8AeTtbOBOoHAxK4dODOWkZtfy-m_i7cWdJ8c,22344
|
|
||||||
pip/_vendor/platformdirs/__main__.py,sha256=jBJ8zb7Mpx5ebcqF83xrpO94MaeCpNGHVf9cvDN2JLg,1505
|
|
||||||
pip/_vendor/platformdirs/android.py,sha256=r0DshVBf-RO1jXJGX8C4Til7F1XWt-bkdWMgmvEiaYg,9013
|
|
||||||
pip/_vendor/platformdirs/api.py,sha256=wPHOlwOsfz2oqQZ6A2FcCu5kEAj-JondzoNOHYFQ0h8,9281
|
|
||||||
pip/_vendor/platformdirs/macos.py,sha256=0XoOgin1NK7Qki7iskD-oS8xKxw6bXgoKEgdqpCRAFQ,6322
|
|
||||||
pip/_vendor/platformdirs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/platformdirs/unix.py,sha256=WZmkUA--L3JNRGmz32s35YfoD3ica6xKIPdCV_HhLcs,10458
|
|
||||||
pip/_vendor/platformdirs/version.py,sha256=BI_dKLSMwlkl57vlxZnT8oVjPiUC2W_sdx_8_h99HeQ,704
|
|
||||||
pip/_vendor/platformdirs/windows.py,sha256=XvCfklGUMVxJbXit51jpYMN-lNeScPB82qS1CAeplL0,10362
|
|
||||||
pip/_vendor/pygments/LICENSE,sha256=qdZvHVJt8C4p3Oc0NtNOVuhjL0bCdbvf_HBWnogvnxc,1331
|
|
||||||
pip/_vendor/pygments/__init__.py,sha256=8uNqJCCwXqbEx5aSsBr0FykUQOBDKBihO5mPqiw1aqo,2983
|
|
||||||
pip/_vendor/pygments/__main__.py,sha256=WrndpSe6i1ckX_SQ1KaxD9CTKGzD0EuCOFxcbwFpoLU,353
|
|
||||||
pip/_vendor/pygments/console.py,sha256=AagDWqwea2yBWf10KC9ptBgMpMjxKp8yABAmh-NQOVk,1718
|
|
||||||
pip/_vendor/pygments/filter.py,sha256=YLtpTnZiu07nY3oK9nfR6E9Y1FBHhP5PX8gvkJWcfag,1910
|
|
||||||
pip/_vendor/pygments/formatter.py,sha256=KZQMmyo_xkOIkQG8g66LYEkBh1bx7a0HyGCBcvhI9Ew,4390
|
|
||||||
pip/_vendor/pygments/lexer.py,sha256=_kBrOJ_NT5Tl0IVM0rA9c8eysP6_yrlGzEQI0eVYB-A,35349
|
|
||||||
pip/_vendor/pygments/modeline.py,sha256=K5eSkR8GS1r5OkXXTHOcV0aM_6xpk9eWNEIAW-OOJ2g,1005
|
|
||||||
pip/_vendor/pygments/plugin.py,sha256=tPx0rJCTIZ9ioRgLNYG4pifCbAwTRUZddvLw-NfAk2w,1891
|
|
||||||
pip/_vendor/pygments/regexopt.py,sha256=wXaP9Gjp_hKAdnICqoDkRxAOQJSc4v3X6mcxx3z-TNs,3072
|
|
||||||
pip/_vendor/pygments/scanner.py,sha256=nNcETRR1tRuiTaHmHSTTECVYFPcLf6mDZu1e4u91A9E,3092
|
|
||||||
pip/_vendor/pygments/sphinxext.py,sha256=5x7Zh9YlU6ISJ31dMwduiaanb5dWZnKg3MyEQsseNnQ,7981
|
|
||||||
pip/_vendor/pygments/style.py,sha256=PlOZqlsnTVd58RGy50vkA2cXQ_lP5bF5EGMEBTno6DA,6420
|
|
||||||
pip/_vendor/pygments/token.py,sha256=WbdWGhYm_Vosb0DDxW9lHNPgITXfWTsQmHt6cy9RbcM,6226
|
|
||||||
pip/_vendor/pygments/unistring.py,sha256=al-_rBemRuGvinsrM6atNsHTmJ6DUbw24q2O2Ru1cBc,63208
|
|
||||||
pip/_vendor/pygments/util.py,sha256=oRtSpiAo5jM9ulntkvVbgXUdiAW57jnuYGB7t9fYuhc,10031
|
|
||||||
pip/_vendor/pygments/filters/__init__.py,sha256=4U4jtA0X3iP83uQnB9-TI-HDSw8E8y8zMYHa0UjbbaI,40392
|
|
||||||
pip/_vendor/pygments/formatters/__init__.py,sha256=KTwBmnXlaopJhQDOemVHYHskiDghuq-08YtP6xPNJPg,5385
|
|
||||||
pip/_vendor/pygments/formatters/_mapping.py,sha256=1Cw37FuQlNacnxRKmtlPX4nyLoX9_ttko5ZwscNUZZ4,4176
|
|
||||||
pip/_vendor/pygments/lexers/__init__.py,sha256=wbIME35GH7bI1B9rNPJFqWT-ij_RApZDYPUlZycaLzA,12115
|
|
||||||
pip/_vendor/pygments/lexers/_mapping.py,sha256=l4tCXM8e9aPC2BD6sjIr0deT-J-z5tHgCwL-p1fS0PE,77602
|
|
||||||
pip/_vendor/pygments/lexers/python.py,sha256=vxjn1cOHclIKJKxoyiBsQTY65GHbkZtZRuKQ2AVCKaw,53853
|
|
||||||
pip/_vendor/pygments/styles/__init__.py,sha256=x9ebctfyvCAFpMTlMJ5YxwcNYBzjgq6zJaKkNm78r4M,2042
|
|
||||||
pip/_vendor/pygments/styles/_mapping.py,sha256=6lovFUE29tz6EsV3XYY4hgozJ7q1JL7cfO3UOlgnS8w,3312
|
|
||||||
pip/_vendor/pyproject_hooks/LICENSE,sha256=GyKwSbUmfW38I6Z79KhNjsBLn9-xpR02DkK0NCyLQVQ,1081
|
|
||||||
pip/_vendor/pyproject_hooks/__init__.py,sha256=cPB_a9LXz5xvsRbX1o2qyAdjLatZJdQ_Lc5McNX-X7Y,691
|
|
||||||
pip/_vendor/pyproject_hooks/_impl.py,sha256=jY-raxnmyRyB57ruAitrJRUzEexuAhGTpgMygqx67Z4,14936
|
|
||||||
pip/_vendor/pyproject_hooks/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/pyproject_hooks/_in_process/__init__.py,sha256=MJNPpfIxcO-FghxpBbxkG1rFiQf6HOUbV4U5mq0HFns,557
|
|
||||||
pip/_vendor/pyproject_hooks/_in_process/_in_process.py,sha256=qcXMhmx__MIJq10gGHW3mA4Tl8dy8YzHMccwnNoKlw0,12216
|
|
||||||
pip/_vendor/requests/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
||||||
pip/_vendor/requests/__init__.py,sha256=HlB_HzhrzGtfD_aaYUwUh1zWXLZ75_YCLyit75d0Vz8,5057
|
|
||||||
pip/_vendor/requests/__version__.py,sha256=QKDceK8K_ujqwDDc3oYrR0odOBYgKVOQQ5vFap_G_cg,435
|
|
||||||
pip/_vendor/requests/_internal_utils.py,sha256=nMQymr4hs32TqVo5AbCrmcJEhvPUh7xXlluyqwslLiQ,1495
|
|
||||||
pip/_vendor/requests/adapters.py,sha256=2MLFOK9GpYNhiTd6zLDUrAgSkIB-76i6pmSuUJjHC2w,26429
|
|
||||||
pip/_vendor/requests/api.py,sha256=_Zb9Oa7tzVIizTKwFrPjDEY9ejtm_OnSRERnADxGsQs,6449
|
|
||||||
pip/_vendor/requests/auth.py,sha256=kF75tqnLctZ9Mf_hm9TZIj4cQWnN5uxRz8oWsx5wmR0,10186
|
|
||||||
pip/_vendor/requests/certs.py,sha256=kHDlkK_beuHXeMPc5jta2wgl8gdKeUWt5f2nTDVrvt8,441
|
|
||||||
pip/_vendor/requests/compat.py,sha256=QfbmdTFiZzjSHMXiMrd4joCRU6RabtQ9zIcPoVaHIus,1822
|
|
||||||
pip/_vendor/requests/cookies.py,sha256=bNi-iqEj4NPZ00-ob-rHvzkvObzN3lEpgw3g6paS3Xw,18590
|
|
||||||
pip/_vendor/requests/exceptions.py,sha256=D1wqzYWne1mS2rU43tP9CeN1G7QAy7eqL9o1god6Ejw,4272
|
|
||||||
pip/_vendor/requests/help.py,sha256=hRKaf9u0G7fdwrqMHtF3oG16RKktRf6KiwtSq2Fo1_0,3813
|
|
||||||
pip/_vendor/requests/hooks.py,sha256=CiuysiHA39V5UfcCBXFIx83IrDpuwfN9RcTUgv28ftQ,733
|
|
||||||
pip/_vendor/requests/models.py,sha256=taljlg6vJ4b-xMu2TaMNFFkaiwMex_VsEQ6qUTN3wzY,35575
|
|
||||||
pip/_vendor/requests/packages.py,sha256=_ZQDCJTJ8SP3kVWunSqBsRZNPzj2c1WFVqbdr08pz3U,1057
|
|
||||||
pip/_vendor/requests/sessions.py,sha256=Cl1dpEnOfwrzzPbku-emepNeN4Rt_0_58Iy2x-JGTm8,30503
|
|
||||||
pip/_vendor/requests/status_codes.py,sha256=iJUAeA25baTdw-6PfD0eF4qhpINDJRJI-yaMqxs4LEI,4322
|
|
||||||
pip/_vendor/requests/structures.py,sha256=-IbmhVz06S-5aPSZuUthZ6-6D9XOjRuTXHOabY041XM,2912
|
|
||||||
pip/_vendor/requests/utils.py,sha256=WS3wHSQaaEfceu1syiFo5jf4e_CWKUTep_IabOVI_J0,33225
|
|
||||||
pip/_vendor/resolvelib/LICENSE,sha256=84j9OMrRMRLB3A9mm76A5_hFQe26-3LzAw0sp2QsPJ0,751
|
|
||||||
pip/_vendor/resolvelib/__init__.py,sha256=yoX-d4STvwGGCiQRE5cJC9Cter69SgVgqClxOCvSP7M,541
|
|
||||||
pip/_vendor/resolvelib/providers.py,sha256=pIWJbIdJJ9GFtNbtwTH0Ia43Vj6hYCEJj2DOLue15FM,8914
|
|
||||||
pip/_vendor/resolvelib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/resolvelib/reporters.py,sha256=pNJf4nFxLpAeKxlBUi2GEj0a2Ij1nikY0UabTKXesT4,2037
|
|
||||||
pip/_vendor/resolvelib/structs.py,sha256=pu-EJiR2IBITr2SQeNPRa0rXhjlStfmO_GEgAhr3004,6420
|
|
||||||
pip/_vendor/resolvelib/resolvers/__init__.py,sha256=728M3EvmnPbVXS7ExXlv2kMu6b7wEsoPutEfl-uVk_I,640
|
|
||||||
pip/_vendor/resolvelib/resolvers/abstract.py,sha256=CNeQPnpAudY77nmzOkONSmAgRlzIf06X-X9mvRYODms,1543
|
|
||||||
pip/_vendor/resolvelib/resolvers/criterion.py,sha256=lcmZGv5sKHOnFD_RzZwvlGSj19MeA-5rCMpdf2Sgw7Y,1768
|
|
||||||
pip/_vendor/resolvelib/resolvers/exceptions.py,sha256=ln_jaQtgLlRUSFY627yiHG2gD7AgaXzRKaElFVh7fDQ,1768
|
|
||||||
pip/_vendor/resolvelib/resolvers/resolution.py,sha256=3J_zkW-sD3EY-BlNXjyln__njpyH5n0UZJT6uV7CheA,24212
|
|
||||||
pip/_vendor/rich/LICENSE,sha256=3u18F6QxgVgZCj6iOcyHmlpQJxzruYrnAl9I--WNyhU,1056
|
|
||||||
pip/_vendor/rich/__init__.py,sha256=dRxjIL-SbFVY0q3IjSMrfgBTHrm1LZDgLOygVBwiYZc,6090
|
|
||||||
pip/_vendor/rich/__main__.py,sha256=e_aVC-tDzarWQW9SuZMuCgBr6ODV_iDNV2Wh2xkxOlw,7896
|
|
||||||
pip/_vendor/rich/_cell_widths.py,sha256=fbmeyetEdHjzE_Vx2l1uK7tnPOhMs2X1lJfO3vsKDpA,10209
|
|
||||||
pip/_vendor/rich/_emoji_codes.py,sha256=hu1VL9nbVdppJrVoijVshRlcRRe_v3dju3Mmd2sKZdY,140235
|
|
||||||
pip/_vendor/rich/_emoji_replace.py,sha256=n-kcetsEUx2ZUmhQrfeMNc-teeGhpuSQ5F8VPBsyvDo,1064
|
|
||||||
pip/_vendor/rich/_export_format.py,sha256=RI08pSrm5tBSzPMvnbTqbD9WIalaOoN5d4M1RTmLq1Y,2128
|
|
||||||
pip/_vendor/rich/_extension.py,sha256=Xt47QacCKwYruzjDi-gOBq724JReDj9Cm9xUi5fr-34,265
|
|
||||||
pip/_vendor/rich/_fileno.py,sha256=HWZxP5C2ajMbHryvAQZseflVfQoGzsKOHzKGsLD8ynQ,799
|
|
||||||
pip/_vendor/rich/_inspect.py,sha256=ROT0PLC2GMWialWZkqJIjmYq7INRijQQkoSokWTaAiI,9656
|
|
||||||
pip/_vendor/rich/_log_render.py,sha256=1ByI0PA1ZpxZY3CGJOK54hjlq4X-Bz_boIjIqCd8Kns,3225
|
|
||||||
pip/_vendor/rich/_loop.py,sha256=hV_6CLdoPm0va22Wpw4zKqM0RYsz3TZxXj0PoS-9eDQ,1236
|
|
||||||
pip/_vendor/rich/_null_file.py,sha256=ADGKp1yt-k70FMKV6tnqCqecB-rSJzp-WQsD7LPL-kg,1394
|
|
||||||
pip/_vendor/rich/_palettes.py,sha256=cdev1JQKZ0JvlguV9ipHgznTdnvlIzUFDBb0It2PzjI,7063
|
|
||||||
pip/_vendor/rich/_pick.py,sha256=evDt8QN4lF5CiwrUIXlOJCntitBCOsI3ZLPEIAVRLJU,423
|
|
||||||
pip/_vendor/rich/_ratio.py,sha256=IOtl78sQCYZsmHyxhe45krkb68u9xVz7zFsXVJD-b2Y,5325
|
|
||||||
pip/_vendor/rich/_spinners.py,sha256=U2r1_g_1zSjsjiUdAESc2iAMc3i4ri_S8PYP6kQ5z1I,19919
|
|
||||||
pip/_vendor/rich/_stack.py,sha256=-C8OK7rxn3sIUdVwxZBBpeHhIzX0eI-VM3MemYfaXm0,351
|
|
||||||
pip/_vendor/rich/_timer.py,sha256=zelxbT6oPFZnNrwWPpc1ktUeAT-Vc4fuFcRZLQGLtMI,417
|
|
||||||
pip/_vendor/rich/_win32_console.py,sha256=BSaDRIMwBLITn_m0mTRLPqME5q-quGdSMuYMpYeYJwc,22755
|
|
||||||
pip/_vendor/rich/_windows.py,sha256=aBwaD_S56SbgopIvayVmpk0Y28uwY2C5Bab1wl3Bp-I,1925
|
|
||||||
pip/_vendor/rich/_windows_renderer.py,sha256=t74ZL3xuDCP3nmTp9pH1L5LiI2cakJuQRQleHCJerlk,2783
|
|
||||||
pip/_vendor/rich/_wrap.py,sha256=FlSsom5EX0LVkA3KWy34yHnCfLtqX-ZIepXKh-70rpc,3404
|
|
||||||
pip/_vendor/rich/abc.py,sha256=ON-E-ZqSSheZ88VrKX2M3PXpFbGEUUZPMa_Af0l-4f0,890
|
|
||||||
pip/_vendor/rich/align.py,sha256=dg-7uY0ukMLLlUEsBDRLva22_sQgIJD4BK0dmZHFHug,10324
|
|
||||||
pip/_vendor/rich/ansi.py,sha256=Avs1LHbSdcyOvDOdpELZUoULcBiYewY76eNBp6uFBhs,6921
|
|
||||||
pip/_vendor/rich/bar.py,sha256=ldbVHOzKJOnflVNuv1xS7g6dLX2E3wMnXkdPbpzJTcs,3263
|
|
||||||
pip/_vendor/rich/box.py,sha256=kmavBc_dn73L_g_8vxWSwYJD2uzBXOUFTtJOfpbczcM,10686
|
|
||||||
pip/_vendor/rich/cells.py,sha256=KrQkj5-LghCCpJLSNQIyAZjndc4bnEqOEmi5YuZ9UCY,5130
|
|
||||||
pip/_vendor/rich/color.py,sha256=3HSULVDj7qQkXUdFWv78JOiSZzfy5y1nkcYhna296V0,18211
|
|
||||||
pip/_vendor/rich/color_triplet.py,sha256=3lhQkdJbvWPoLDO-AnYImAWmJvV5dlgYNCVZ97ORaN4,1054
|
|
||||||
pip/_vendor/rich/columns.py,sha256=HUX0KcMm9dsKNi11fTbiM_h2iDtl8ySCaVcxlalEzq8,7131
|
|
||||||
pip/_vendor/rich/console.py,sha256=t9azZpmRMVU5cphVBZSShNsmBxd2-IAWcTTlhor-E1s,100849
|
|
||||||
pip/_vendor/rich/constrain.py,sha256=1VIPuC8AgtKWrcncQrjBdYqA3JVWysu6jZo1rrh7c7Q,1288
|
|
||||||
pip/_vendor/rich/containers.py,sha256=c_56TxcedGYqDepHBMTuZdUIijitAQgnox-Qde0Z1qo,5502
|
|
||||||
pip/_vendor/rich/control.py,sha256=EUTSUFLQbxY6Zmo_sdM-5Ls323vIHTBfN8TPulqeHUY,6487
|
|
||||||
pip/_vendor/rich/default_styles.py,sha256=khQFqqaoDs3bprMqWpHw8nO5UpG2DN6QtuTd6LzZwYc,8257
|
|
||||||
pip/_vendor/rich/diagnose.py,sha256=fJl1TItRn19gGwouqTg-8zPUW3YqQBqGltrfPQs1H9w,1025
|
|
||||||
pip/_vendor/rich/emoji.py,sha256=Wd4bQubZdSy6-PyrRQNuMHtn2VkljK9uPZPVlu2cmx0,2367
|
|
||||||
pip/_vendor/rich/errors.py,sha256=5pP3Kc5d4QJ_c0KFsxrfyhjiPVe7J1zOqSFbFAzcV-Y,642
|
|
||||||
pip/_vendor/rich/file_proxy.py,sha256=Tl9THMDZ-Pk5Wm8sI1gGg_U5DhusmxD-FZ0fUbcU0W0,1683
|
|
||||||
pip/_vendor/rich/filesize.py,sha256=_iz9lIpRgvW7MNSeCZnLg-HwzbP4GETg543WqD8SFs0,2484
|
|
||||||
pip/_vendor/rich/highlighter.py,sha256=G_sn-8DKjM1sEjLG_oc4ovkWmiUpWvj8bXi0yed2LnY,9586
|
|
||||||
pip/_vendor/rich/json.py,sha256=vVEoKdawoJRjAFayPwXkMBPLy7RSTs-f44wSQDR2nJ0,5031
|
|
||||||
pip/_vendor/rich/jupyter.py,sha256=QyoKoE_8IdCbrtiSHp9TsTSNyTHY0FO5whE7jOTd9UE,3252
|
|
||||||
pip/_vendor/rich/layout.py,sha256=ajkSFAtEVv9EFTcFs-w4uZfft7nEXhNzL7ZVdgrT5rI,14004
|
|
||||||
pip/_vendor/rich/live.py,sha256=tF3ukAAJZ_N2ZbGclqZ-iwLoIoZ8f0HHUz79jAyJqj8,15180
|
|
||||||
pip/_vendor/rich/live_render.py,sha256=It_39YdzrBm8o3LL0kaGorPFg-BfZWAcrBjLjFokbx4,3521
|
|
||||||
pip/_vendor/rich/logging.py,sha256=5KaPPSMP9FxcXPBcKM4cGd_zW78PMgf-YbMVnvfSw0o,12468
|
|
||||||
pip/_vendor/rich/markup.py,sha256=3euGKP5s41NCQwaSjTnJxus5iZMHjxpIM0W6fCxra38,8451
|
|
||||||
pip/_vendor/rich/measure.py,sha256=HmrIJX8sWRTHbgh8MxEay_83VkqNW_70s8aKP5ZcYI8,5305
|
|
||||||
pip/_vendor/rich/padding.py,sha256=KVEI3tOwo9sgK1YNSuH__M1_jUWmLZwRVV_KmOtVzyM,4908
|
|
||||||
pip/_vendor/rich/pager.py,sha256=SO_ETBFKbg3n_AgOzXm41Sv36YxXAyI3_R-KOY2_uSc,828
|
|
||||||
pip/_vendor/rich/palette.py,sha256=lInvR1ODDT2f3UZMfL1grq7dY_pDdKHw4bdUgOGaM4Y,3396
|
|
||||||
pip/_vendor/rich/panel.py,sha256=9sQl00hPIqH5G2gALQo4NepFwpP0k9wT-s_gOms5pIc,11157
|
|
||||||
pip/_vendor/rich/pretty.py,sha256=gy3S72u4FRg2ytoo7N1ZDWDIvB4unbzd5iUGdgm-8fc,36391
|
|
||||||
pip/_vendor/rich/progress.py,sha256=CUc2lkU-X59mVdGfjMCBkZeiGPL3uxdONjhNJF2T7wY,60408
|
|
||||||
pip/_vendor/rich/progress_bar.py,sha256=mZTPpJUwcfcdgQCTTz3kyY-fc79ddLwtx6Ghhxfo064,8162
|
|
||||||
pip/_vendor/rich/prompt.py,sha256=l0RhQU-0UVTV9e08xW1BbIj0Jq2IXyChX4lC0lFNzt4,12447
|
|
||||||
pip/_vendor/rich/protocol.py,sha256=5hHHDDNHckdk8iWH5zEbi-zuIVSF5hbU2jIo47R7lTE,1391
|
|
||||||
pip/_vendor/rich/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/rich/region.py,sha256=rNT9xZrVZTYIXZC0NYn41CJQwYNbR-KecPOxTgQvB8Y,166
|
|
||||||
pip/_vendor/rich/repr.py,sha256=5MZJZmONgC6kud-QW-_m1okXwL2aR6u6y-pUcUCJz28,4431
|
|
||||||
pip/_vendor/rich/rule.py,sha256=0fNaS_aERa3UMRc3T5WMpN_sumtDxfaor2y3of1ftBk,4602
|
|
||||||
pip/_vendor/rich/scope.py,sha256=TMUU8qo17thyqQCPqjDLYpg_UU1k5qVd-WwiJvnJVas,2843
|
|
||||||
pip/_vendor/rich/screen.py,sha256=YoeReESUhx74grqb0mSSb9lghhysWmFHYhsbMVQjXO8,1591
|
|
||||||
pip/_vendor/rich/segment.py,sha256=otnKeKGEV-WRlQVosfJVeFDcDxAKHpvJ_hLzSu5lumM,24743
|
|
||||||
pip/_vendor/rich/spinner.py,sha256=onIhpKlljRHppTZasxO8kXgtYyCHUkpSgKglRJ3o51g,4214
|
|
||||||
pip/_vendor/rich/status.py,sha256=kkPph3YeAZBo-X-4wPp8gTqZyU466NLwZBA4PZTTewo,4424
|
|
||||||
pip/_vendor/rich/style.py,sha256=W9Ccy8Py8lNICtlfcp-ryzMTuQaGxAU3av7-g5fHu0s,26990
|
|
||||||
pip/_vendor/rich/styled.py,sha256=eZNnzGrI4ki_54pgY3Oj0T-x3lxdXTYh4_ryDB24wBU,1258
|
|
||||||
pip/_vendor/rich/syntax.py,sha256=eDKIRwl--eZ0Lwo2da2RRtfutXGavrJO61Cl5OkS59U,36371
|
|
||||||
pip/_vendor/rich/table.py,sha256=ZmT7V7MMCOYKw7TGY9SZLyYDf6JdM-WVf07FdVuVhTI,40049
|
|
||||||
pip/_vendor/rich/terminal_theme.py,sha256=1j5-ufJfnvlAo5Qsi_ACZiXDmwMXzqgmFByObT9-yJY,3370
|
|
||||||
pip/_vendor/rich/text.py,sha256=AO7JPCz6-gaN1thVLXMBntEmDPVYFgFNG1oM61_sanU,47552
|
|
||||||
pip/_vendor/rich/theme.py,sha256=oNyhXhGagtDlbDye3tVu3esWOWk0vNkuxFw-_unlaK0,3771
|
|
||||||
pip/_vendor/rich/themes.py,sha256=0xgTLozfabebYtcJtDdC5QkX5IVUEaviqDUJJh4YVFk,102
|
|
||||||
pip/_vendor/rich/traceback.py,sha256=c0WmB_L04_UfZbLaoH982_U_s7eosxKMUiAVmDPdRYU,35861
|
|
||||||
pip/_vendor/rich/tree.py,sha256=yWnQ6rAvRGJ3qZGqBrxS2SW2TKBTNrP0SdY8QxOFPuw,9451
|
|
||||||
pip/_vendor/tomli/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
|
||||||
pip/_vendor/tomli/__init__.py,sha256=qzEGl8QHhqgQPCuLzfKyPIuH3KKPspf-UVPbZ0ppBD4,314
|
|
||||||
pip/_vendor/tomli/_parser.py,sha256=bO8tUYmnyA2K6m4TnbQbfUqmIFcDv7mG1KuC9gqRVmA,25778
|
|
||||||
pip/_vendor/tomli/_re.py,sha256=n8-Io8ZK1U-F6jzlg7Pabc40hLFJsawE2uNLKH9w7iU,3235
|
|
||||||
pip/_vendor/tomli/_types.py,sha256=-GTG2VUqkpxwMqzmVO4F7ybKddIbAnuAHXfmWQcTi3Q,254
|
|
||||||
pip/_vendor/tomli/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
|
||||||
pip/_vendor/tomli_w/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
|
||||||
pip/_vendor/tomli_w/__init__.py,sha256=0F8yDtXx3Uunhm874KrAcP76srsM98y7WyHQwCulZbo,169
|
|
||||||
pip/_vendor/tomli_w/_writer.py,sha256=dsifFS2xYf1i76mmRyfz9y125xC7Z_HQ845ZKhJsYXs,6961
|
|
||||||
pip/_vendor/tomli_w/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
|
||||||
pip/_vendor/truststore/LICENSE,sha256=M757fo-k_Rmxdg4ajtimaL2rhSyRtpLdQUJLy3Jan8o,1086
|
|
||||||
pip/_vendor/truststore/__init__.py,sha256=Bu7kqkmpunhLsj5xCu8gT_25ktoPXcSnwe8VHk1GmJo,1320
|
|
||||||
pip/_vendor/truststore/_api.py,sha256=CYJCV5BTfttZYfqY3movdMBE-8az7uhET_LYbKT2Nn4,11413
|
|
||||||
pip/_vendor/truststore/_macos.py,sha256=nZlLkOmszUE0g6ryRwBVGY5COzPyudcsiJtDWarM5LQ,20503
|
|
||||||
pip/_vendor/truststore/_openssl.py,sha256=zB-SQvJydks7tQ0yIwrP6GD3fQNSSaPiq7zw4yF5T40,2412
|
|
||||||
pip/_vendor/truststore/_ssl_constants.py,sha256=NUD4fVKdSD02ri7-db0tnO0VqLP9aHuzmStcW7tAl08,1130
|
|
||||||
pip/_vendor/truststore/_windows.py,sha256=rAHyKYD8M7t-bXfG8VgOVa3TpfhVhbt4rZQlO45YuP8,17993
|
|
||||||
pip/_vendor/truststore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/urllib3/LICENSE.txt,sha256=w3vxhuJ8-dvpYZ5V7f486nswCRzrPaY8fay-Dm13kHs,1115
|
|
||||||
pip/_vendor/urllib3/__init__.py,sha256=iXLcYiJySn0GNbWOOZDDApgBL1JgP44EZ8i1760S8Mc,3333
|
|
||||||
pip/_vendor/urllib3/_collections.py,sha256=pyASJJhW7wdOpqJj9QJA8FyGRfr8E8uUUhqUvhF0728,11372
|
|
||||||
pip/_vendor/urllib3/_version.py,sha256=t9wGB6ooOTXXgiY66K1m6BZS1CJyXHAU8EoWDTe6Shk,64
|
|
||||||
pip/_vendor/urllib3/connection.py,sha256=ttIA909BrbTUzwkqEe_TzZVh4JOOj7g61Ysei2mrwGg,20314
|
|
||||||
pip/_vendor/urllib3/connectionpool.py,sha256=e2eiAwNbFNCKxj4bwDKNK-w7HIdSz3OmMxU_TIt-evQ,40408
|
|
||||||
pip/_vendor/urllib3/exceptions.py,sha256=0Mnno3KHTNfXRfY7638NufOPkUb6mXOm-Lqj-4x2w8A,8217
|
|
||||||
pip/_vendor/urllib3/fields.py,sha256=kvLDCg_JmH1lLjUUEY_FLS8UhY7hBvDPuVETbY8mdrM,8579
|
|
||||||
pip/_vendor/urllib3/filepost.py,sha256=5b_qqgRHVlL7uLtdAYBzBh-GHmU5AfJVt_2N0XS3PeY,2440
|
|
||||||
pip/_vendor/urllib3/poolmanager.py,sha256=aWyhXRtNO4JUnCSVVqKTKQd8EXTvUm1VN9pgs2bcONo,19990
|
|
||||||
pip/_vendor/urllib3/request.py,sha256=YTWFNr7QIwh7E1W9dde9LM77v2VWTJ5V78XuTTw7D1A,6691
|
|
||||||
pip/_vendor/urllib3/response.py,sha256=fmDJAFkG71uFTn-sVSTh2Iw0WmcXQYqkbRjihvwBjU8,30641
|
|
||||||
pip/_vendor/urllib3/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/urllib3/contrib/_appengine_environ.py,sha256=bDbyOEhW2CKLJcQqAKAyrEHN-aklsyHFKq6vF8ZFsmk,957
|
|
||||||
pip/_vendor/urllib3/contrib/appengine.py,sha256=VR68eAVE137lxTgjBDwCna5UiBZTOKa01Aj_-5BaCz4,11036
|
|
||||||
pip/_vendor/urllib3/contrib/ntlmpool.py,sha256=NlfkW7WMdW8ziqudopjHoW299og1BTWi0IeIibquFwk,4528
|
|
||||||
pip/_vendor/urllib3/contrib/pyopenssl.py,sha256=hDJh4MhyY_p-oKlFcYcQaVQRDv6GMmBGuW9yjxyeejM,17081
|
|
||||||
pip/_vendor/urllib3/contrib/securetransport.py,sha256=Fef1IIUUFHqpevzXiDPbIGkDKchY2FVKeVeLGR1Qq3g,34446
|
|
||||||
pip/_vendor/urllib3/contrib/socks.py,sha256=aRi9eWXo9ZEb95XUxef4Z21CFlnnjbEiAo9HOseoMt4,7097
|
|
||||||
pip/_vendor/urllib3/contrib/_securetransport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/urllib3/contrib/_securetransport/bindings.py,sha256=4Xk64qIkPBt09A5q-RIFUuDhNc9mXilVapm7WnYnzRw,17632
|
|
||||||
pip/_vendor/urllib3/contrib/_securetransport/low_level.py,sha256=B2JBB2_NRP02xK6DCa1Pa9IuxrPwxzDzZbixQkb7U9M,13922
|
|
||||||
pip/_vendor/urllib3/packages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/urllib3/packages/six.py,sha256=b9LM0wBXv7E7SrbCjAm4wwN-hrH-iNxv18LgWNMMKPo,34665
|
|
||||||
pip/_vendor/urllib3/packages/backports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
||||||
pip/_vendor/urllib3/packages/backports/makefile.py,sha256=nbzt3i0agPVP07jqqgjhaYjMmuAi_W5E0EywZivVO8E,1417
|
|
||||||
pip/_vendor/urllib3/packages/backports/weakref_finalize.py,sha256=tRCal5OAhNSRyb0DhHp-38AtIlCsRP8BxF3NX-6rqIA,5343
|
|
||||||
pip/_vendor/urllib3/util/__init__.py,sha256=JEmSmmqqLyaw8P51gUImZh8Gwg9i1zSe-DoqAitn2nc,1155
|
|
||||||
pip/_vendor/urllib3/util/connection.py,sha256=5Lx2B1PW29KxBn2T0xkN1CBgRBa3gGVJBKoQoRogEVk,4901
|
|
||||||
pip/_vendor/urllib3/util/proxy.py,sha256=zUvPPCJrp6dOF0N4GAVbOcl6o-4uXKSrGiTkkr5vUS4,1605
|
|
||||||
pip/_vendor/urllib3/util/queue.py,sha256=nRgX8_eX-_VkvxoX096QWoz8Ps0QHUAExILCY_7PncM,498
|
|
||||||
pip/_vendor/urllib3/util/request.py,sha256=C0OUt2tcU6LRiQJ7YYNP9GvPrSvl7ziIBekQ-5nlBZk,3997
|
|
||||||
pip/_vendor/urllib3/util/response.py,sha256=GJpg3Egi9qaJXRwBh5wv-MNuRWan5BIu40oReoxWP28,3510
|
|
||||||
pip/_vendor/urllib3/util/retry.py,sha256=6ENvOZ8PBDzh8kgixpql9lIrb2dxH-k7ZmBanJF2Ng4,22050
|
|
||||||
pip/_vendor/urllib3/util/ssl_.py,sha256=QDuuTxPSCj1rYtZ4xpD7Ux-r20TD50aHyqKyhQ7Bq4A,17460
|
|
||||||
pip/_vendor/urllib3/util/ssl_match_hostname.py,sha256=Ir4cZVEjmAk8gUAIHWSi7wtOO83UCYABY2xFD1Ql_WA,5758
|
|
||||||
pip/_vendor/urllib3/util/ssltransport.py,sha256=NA-u5rMTrDFDFC8QzRKUEKMG0561hOD4qBTr3Z4pv6E,6895
|
|
||||||
pip/_vendor/urllib3/util/timeout.py,sha256=cwq4dMk87mJHSBktK1miYJ-85G-3T3RmT20v7SFCpno,10168
|
|
||||||
pip/_vendor/urllib3/util/url.py,sha256=lCAE7M5myA8EDdW0sJuyyZhVB9K_j38ljWhHAnFaWoE,14296
|
|
||||||
pip/_vendor/urllib3/util/wait.py,sha256=fOX0_faozG2P7iVojQoE1mbydweNyTcm-hXEfFrTtLI,5403
|
|
||||||
pip-26.0.1.dist-info/entry_points.txt,sha256=Vhf8s0IYgX37mtd4vGL73BPcxdKnqeCFPzB5-d30x8o,84
|
|
||||||
pip-26.0.1.dist-info/licenses/AUTHORS.txt,sha256=grSl9YDNOpOFFJTX8ZYKSdgfouXi_DzlRyYGE2-u5aI,11731
|
|
||||||
pip-26.0.1.dist-info/licenses/LICENSE.txt,sha256=Y0MApmnUmurmWxLGxIySTFGkzfPR_whtw0VtyLyqIQQ,1093
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt,sha256=hu7uh74qQ_P_H1ZJb0UfaSQ5JvAl_tuwM2ZsMExMFhs,558
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/LICENSE,sha256=6TcW2mucDVpKHfYP5pWzcPBpVgPSH2-D8FPkLPwQyvc,989
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt,sha256=GrNuPipLqGMWJThPh-ngkdsfrtA0xbIzJbMjmr8sxSU,1099
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt,sha256=gI4QyKarjesUn_mz-xn0R6gICUYG1xKpylf-rTVSWZ0,14531
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/LICENSE,sha256=y16Ofl9KOYjhBjwULGDcLfdWBfTEZRXnduOspt-XbhQ,11325
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md,sha256=t6M2q_OwThgOwGXN0W5wXQeeHMehT5EKpukYfza5zYc,1541
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/COPYING,sha256=SS3tuoXaWHL3jmCRvNH-pHTWYNNay03ulkuKqz8AdCc,614
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE,sha256=KeD9YukphQ6G6yjD_czwzv30-pSHkBHP-z0NS-1tTbY,1089
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/LICENSE,sha256=qdZvHVJt8C4p3Oc0NtNOVuhjL0bCdbvf_HBWnogvnxc,1331
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE,sha256=GyKwSbUmfW38I6Z79KhNjsBLn9-xpR02DkK0NCyLQVQ,1081
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE,sha256=84j9OMrRMRLB3A9mm76A5_hFQe26-3LzAw0sp2QsPJ0,751
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/LICENSE,sha256=3u18F6QxgVgZCj6iOcyHmlpQJxzruYrnAl9I--WNyhU,1056
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/LICENSE,sha256=M757fo-k_Rmxdg4ajtimaL2rhSyRtpLdQUJLy3Jan8o,1086
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt,sha256=w3vxhuJ8-dvpYZ5V7f486nswCRzrPaY8fay-Dm13kHs,1115
|
|
||||||
pip-26.0.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
||||||
pip-26.0.1.dist-info/METADATA,sha256=ZqIZuNGsG6l2gHiKlQjVQghFQhgSWfhEDHuCVPW3aN8,4675
|
|
||||||
pip-26.0.1.dist-info/RECORD,,
|
|
||||||
pip/_vendor/requests/auth.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/themes.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/request.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_loop.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/file_proxy.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distro/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/vcs/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/network/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/resolvers/resolution.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/__pycache__,,
|
|
||||||
pip/_vendor/packaging/_musllinux.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.virtualenv,,
|
|
||||||
pip/_vendor/rich/_export_format.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/installation_report.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/compat.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/prompt.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/build/wheel.cpython-314.pyc,,
|
|
||||||
pip/_internal/req/pep723.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/build/metadata.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/tree.cpython-314.pyc,,
|
|
||||||
pip/_internal/__pycache__,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/__pycache__,,
|
|
||||||
pip/_vendor/idna/__pycache__,,
|
|
||||||
pip/__pip-runner__.cpython-314.pyc,,
|
|
||||||
pip/_internal/index/collector.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_null_file.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/__pycache__,,
|
|
||||||
pip-26.0.1.dist-info/licenses/__pycache__,,
|
|
||||||
pip/_vendor/urllib3/__pycache__,,
|
|
||||||
pip/_internal/network/xmlrpc.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/cookies.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/rule.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/regexopt.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/packages/backports/__pycache__,,
|
|
||||||
pip/_internal/build_env.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/target_python.cpython-314.pyc,,
|
|
||||||
pip/_internal/vcs/__pycache__,,
|
|
||||||
pip/_vendor/urllib3/fields.cpython-314.pyc,,
|
|
||||||
pip/_internal/distributions/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/status_codes.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/debug.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/errors.cpython-314.pyc,,
|
|
||||||
pip/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/ssltransport.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_log_render.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/_structures.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/req_command.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/formatters/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/panel.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/__pycache__,,
|
|
||||||
pip/_internal/cli/base_command.cpython-314.pyc,,
|
|
||||||
pip/_vendor/idna/package_data.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/markers.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/format_control.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/retry.cpython-314.pyc,,
|
|
||||||
pip/_vendor/tomli/__pycache__,,
|
|
||||||
pip/_vendor/rich/_emoji_replace.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/scheme.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/__main__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/logging.cpython-314.pyc,,
|
|
||||||
pip/_vendor/__pycache__,,
|
|
||||||
pip/_vendor/pygments/filters/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/box.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/install.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/logging.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/req/__pycache__,,
|
|
||||||
pip/_internal/resolution/resolvelib/requirements.cpython-314.pyc,,
|
|
||||||
pip/_internal/distributions/wheel.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/layout.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distlib/compat.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/filewrapper.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/jupyter.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/index_command.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/distributions/installed.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/wait.cpython-314.pyc,,
|
|
||||||
pip/_internal/vcs/git.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/region.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/filesize.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/egg_link.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/cache.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/formatters/__pycache__,,
|
|
||||||
pip/_internal/utils/wheel.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/freeze.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/_manylinux.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/build/build_tracker.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/__pycache__,,
|
|
||||||
pip/_internal/utils/virtualenv.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/poolmanager.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/token.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/modeline.cpython-314.pyc,,
|
|
||||||
pip/_vendor/dependency_groups/_lint_dependency_groups.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/candidate.cpython-314.pyc,,
|
|
||||||
pip/_internal/index/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distro/distro.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_spinners.cpython-314.pyc,,
|
|
||||||
pip/_internal/cache.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/resolvers/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/models.cpython-314.pyc,,
|
|
||||||
pip/_internal/network/__pycache__,,
|
|
||||||
pip/_vendor/packaging/_tokenizer.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/reporters.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/ntlmpool.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/__pycache__,,
|
|
||||||
pip/_internal/utils/entrypoints.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/urls.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/__pycache__,,
|
|
||||||
pip/_internal/resolution/resolvelib/factory.cpython-314.pyc,,
|
|
||||||
pip/_internal/network/cache.cpython-314.pyc,,
|
|
||||||
pip/_vendor/platformdirs/api.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/importlib/__pycache__,,
|
|
||||||
pip/_vendor/rich/_palettes.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/appdirs.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distlib/resources.cpython-314.pyc,,
|
|
||||||
pip/_vendor/truststore/__pycache__,,
|
|
||||||
pip/_vendor/pygments/styles/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/vcs/versioncontrol.cpython-314.pyc,,
|
|
||||||
pip/_internal/vcs/subversion.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/measure.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/main_parser.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/__main__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/emoji.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pkg_resources/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/msgpack/__init__.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/__pycache__,,
|
|
||||||
pip/_vendor/platformdirs/unix.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/align.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/inspect.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/table.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/resolvelib/__pycache__,,
|
|
||||||
pip/_vendor/platformdirs/__main__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/adapter.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/selection_prefs.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/caches/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/locations/_sysconfig.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/caches/file_cache.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_emoji_codes.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/spinners.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/cmdoptions.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/resolvelib/resolver.cpython-314.pyc,,
|
|
||||||
pip/_vendor/idna/compat.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/packaging.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/_version.cpython-314.pyc,,
|
|
||||||
pip/_vendor/idna/__init__.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/__pycache__,,
|
|
||||||
pip/_vendor/pygments/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distlib/__pycache__,,
|
|
||||||
pip/_vendor/cachecontrol/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/legacy/resolver.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_cell_widths.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/heuristics.cpython-314.pyc,,
|
|
||||||
pip/_vendor/truststore/_ssl_constants.cpython-314.pyc,,
|
|
||||||
pip/_internal/distributions/base.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_windows_renderer.cpython-314.pyc,,
|
|
||||||
pip/_internal/wheel_builder.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/filters/__pycache__,,
|
|
||||||
pip/_internal/req/req_file.cpython-314.pyc,,
|
|
||||||
pip/_vendor/tomli/_parser.cpython-314.pyc,,
|
|
||||||
pip/_internal/network/auth.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/completion.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/_elffile.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/importlib/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/style.cpython-314.pyc,,
|
|
||||||
pip/__main__.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/legacy/__pycache__,,
|
|
||||||
pip/_vendor/pygments/util.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/timeout.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_wrap.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/filesystem.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/licenses/_spdx.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pyproject_hooks/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/terminal_theme.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/styles/__pycache__,,
|
|
||||||
pip/_vendor/pyproject_hooks/_in_process/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/idna/uts46data.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/resolvers/abstract.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/adapters.cpython-314.pyc,,
|
|
||||||
pip/_internal/locations/_distutils.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/columns.cpython-314.pyc,,
|
|
||||||
pip/_internal/network/session.cpython-314.pyc,,
|
|
||||||
pip/_vendor/tomli_w/_writer.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/list.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/default_styles.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/compat.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/__pycache__,,
|
|
||||||
pip/_vendor/idna/idnadata.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distlib/util.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/providers.cpython-314.pyc,,
|
|
||||||
pip/_vendor/tomli_w/__init__.cpython-314.pyc,,
|
|
||||||
../../../bin/pip,,
|
|
||||||
pip/_vendor/urllib3/packages/__pycache__,,
|
|
||||||
pip/_vendor/certifi/__main__.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/__pycache__,,
|
|
||||||
pip/_vendor/urllib3/util/queue.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/certs.cpython-314.pyc,,
|
|
||||||
pip/_internal/req/req_install.cpython-314.pyc,,
|
|
||||||
pip/_internal/index/__pycache__,,
|
|
||||||
pip/_internal/commands/hash.cpython-314.pyc,,
|
|
||||||
pip/_vendor/dependency_groups/_implementation.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_timer.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/ssl_.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/_securetransport/bindings.cpython-314.pyc,,
|
|
||||||
pip/_vendor/dependency_groups/_pip_wrapper.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/importlib/_dists.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/__pycache__,,
|
|
||||||
pip/_internal/network/download.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/syntax.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/metadata.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/licenses/__pycache__,,
|
|
||||||
pip/_internal/models/search_scope.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/progress_bar.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/__pycache__,,
|
|
||||||
pip/_vendor/msgpack/ext.cpython-314.pyc,,
|
|
||||||
pip/_internal/req/req_uninstall.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/resolvers/criterion.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/scanner.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/styled.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/freeze.cpython-314.pyc,,
|
|
||||||
pip/_vendor/platformdirs/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/deprecation.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/legacy/__init__.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/__pycache__,,
|
|
||||||
pip/_vendor/rich/repr.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/pager.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/appengine.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/__pycache__,,
|
|
||||||
pip/_vendor/rich/_win32_console.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/sphinxext.cpython-314.pyc,,
|
|
||||||
pip/_internal/locations/__pycache__,,
|
|
||||||
pip/_vendor/pyproject_hooks/_in_process/_in_process.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/direct_url_helpers.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/_collections.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/theme.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/main.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/abc.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/datetime.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_ratio.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/parser.cpython-314.pyc,,
|
|
||||||
pip/_internal/main.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/plugin.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/padding.cpython-314.pyc,,
|
|
||||||
pip/_vendor/certifi/__pycache__,,
|
|
||||||
pip/_vendor/rich/_stack.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/requirements.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/build/__pycache__,,
|
|
||||||
pip/_internal/req/constructors.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/connection.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/base.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/hooks.cpython-314.pyc,,
|
|
||||||
pip/_vendor/truststore/_openssl.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/packages/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/_cmd.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/__pycache__,,
|
|
||||||
pip/_vendor/pygments/formatter.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/resolvelib/found_candidates.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/connectionpool.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/__version__.cpython-314.pyc,,
|
|
||||||
pip/_internal/index/package_finder.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/url.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distro/__pycache__,,
|
|
||||||
pip/_internal/cli/command_context.cpython-314.pyc,,
|
|
||||||
pip/_vendor/truststore/_windows.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/palette.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/unpacking.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/_securetransport/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/tomli/_re.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/scope.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/__pycache__,,
|
|
||||||
pip/_vendor/urllib3/util/__pycache__,,
|
|
||||||
pip/_vendor/requests/status_codes.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/lexers/_mapping.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/link.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/resolvelib/provider.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pkg_resources/__pycache__,,
|
|
||||||
pip/_vendor/rich/containers.cpython-314.pyc,,
|
|
||||||
pip/_internal/self_outdated_check.cpython-314.pyc,,
|
|
||||||
pip/_vendor/platformdirs/android.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/packages/backports/makefile.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/__pycache__,,
|
|
||||||
pip/_vendor/rich/screen.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/controller.cpython-314.pyc,,
|
|
||||||
pip/_vendor/idna/intranges.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/INSTALLER,,
|
|
||||||
pip/_internal/utils/glibc.cpython-314.pyc,,
|
|
||||||
pip/_internal/exceptions.cpython-314.pyc,,
|
|
||||||
pip/_vendor/truststore/_macos.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/resolvelib/reporter.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pyproject_hooks/_impl.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/__init__.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/__pycache__,,
|
|
||||||
pip/_internal/resolution/resolvelib/candidates.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/pyopenssl.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/lexer.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/configuration.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/__pycache__,,
|
|
||||||
pip/_vendor/rich/segment.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/constrain.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/version.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/control.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_extension.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/__pycache__,,
|
|
||||||
pip/_vendor/tomli_w/__pycache__,,
|
|
||||||
pip/_vendor/urllib3/contrib/_securetransport/low_level.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/__pycache__,,
|
|
||||||
pip/_internal/resolution/resolvelib/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/__pycache__,,
|
|
||||||
pip/_vendor/dependency_groups/__pycache__,,
|
|
||||||
pip/_internal/cli/autocompletion.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/json.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/securetransport.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/__pycache__,,
|
|
||||||
pip/_vendor/urllib3/packages/backports/weakref_finalize.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/filter.cpython-314.pyc,,
|
|
||||||
pip/_internal/network/utils.cpython-314.pyc,,
|
|
||||||
pip/_internal/distributions/sdist.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/serialize.cpython-314.pyc,,
|
|
||||||
pip/_vendor/dependency_groups/_toml_compat.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/licenses/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/cli/progress_bars.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/lock.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/__pycache__,,
|
|
||||||
pip/_internal/commands/download.cpython-314.pyc,,
|
|
||||||
pip/_vendor/certifi/core.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/__pycache__,,
|
|
||||||
pip/_vendor/urllib3/request.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/progress.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_pick.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/install/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/sessions.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/api.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/resolvers/__pycache__,,
|
|
||||||
pip/_vendor/rich/diagnose.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/__pycache__,,
|
|
||||||
pip/_internal/commands/show.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/socks.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/subprocess.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/uninstall.cpython-314.pyc,,
|
|
||||||
pip/_internal/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/dependency_groups/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/install/wheel.cpython-314.pyc,,
|
|
||||||
../../../bin/pip3,,
|
|
||||||
pip/_vendor/urllib3/util/ssl_match_hostname.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/_appengine_environ.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/live_render.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/connection.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/misc.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/__pycache__,,
|
|
||||||
pip/_vendor/truststore/_api.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/__pycache__,,
|
|
||||||
pip/_internal/operations/build/metadata_editable.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/base.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/wrapper.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/help.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/color_triplet.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/tags.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/pylock.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/pretty.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/response.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/styles/_mapping.cpython-314.pyc,,
|
|
||||||
pip/_internal/req/req_dependency_group.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/console.cpython-314.pyc,,
|
|
||||||
pip/_vendor/msgpack/exceptions.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pyproject_hooks/_in_process/__pycache__,,
|
|
||||||
pip/_vendor/msgpack/__pycache__,,
|
|
||||||
pip/_vendor/pygments/formatters/_mapping.cpython-314.pyc,,
|
|
||||||
pip/_vendor/idna/core.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/color.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/contrib/_securetransport/__pycache__,,
|
|
||||||
pip/_vendor/distlib/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/truststore/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/_jaraco_text.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/__pycache__,,
|
|
||||||
pip/_vendor/pygments/lexers/__pycache__,,
|
|
||||||
pip/_internal/index/sources.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_inspect.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/style.cpython-314.pyc,,
|
|
||||||
pip/_vendor/tomli/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/lexers/python.cpython-314.pyc,,
|
|
||||||
pip/_internal/configuration.cpython-314.pyc,,
|
|
||||||
pip/_vendor/platformdirs/macos.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/text.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/check.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/pkg_resources.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/prepare.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/utils.cpython-314.pyc,,
|
|
||||||
pip/_vendor/platformdirs/__pycache__,,
|
|
||||||
pip/_internal/locations/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/filetypes.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/__pycache__,,
|
|
||||||
pip/_internal/vcs/mercurial.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distlib/scripts.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/packages.cpython-314.pyc,,
|
|
||||||
../../../bin/pip3.14,,
|
|
||||||
pip/_internal/operations/build/wheel_editable.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/__pycache__,,
|
|
||||||
pip/_internal/pyproject.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/_log.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/status.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/direct_url.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/resolvers/exceptions.cpython-314.pyc,,
|
|
||||||
pip/_vendor/platformdirs/windows.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/protocol.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/highlighter.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/_json.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/hashes.cpython-314.pyc,,
|
|
||||||
pip/_vendor/msgpack/fallback.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/cells.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/check.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/unistring.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/index.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pyproject_hooks/__pycache__,,
|
|
||||||
pip/_vendor/certifi/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/wheel.cpython-314.pyc,,
|
|
||||||
pip/_vendor/dependency_groups/__main__.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/compatibility_tags.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/_windows.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/packages/six.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/bar.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/exceptions.cpython-314.pyc,,
|
|
||||||
pip/_vendor/resolvelib/structs.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/ansi.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/__pycache__,,
|
|
||||||
pip-26.0.1.dist-info/__pycache__,,
|
|
||||||
pip/_internal/commands/wheel.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/install/__pycache__,,
|
|
||||||
pip/_vendor/idna/codec.cpython-314.pyc,,
|
|
||||||
pip/__pycache__,,
|
|
||||||
pip/_internal/commands/cache.cpython-314.pyc,,
|
|
||||||
pip/_vendor/tomli/_types.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/response.cpython-314.pyc,,
|
|
||||||
../../../bin/pip-3.14,,
|
|
||||||
pip/_vendor/rich/_fileno.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/caches/__pycache__,,
|
|
||||||
pip/_vendor/rich/markup.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/_parser.cpython-314.pyc,,
|
|
||||||
pip/_vendor/distro/__main__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/utils.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/packages/backports/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/network/lazy_wheel.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/proxy.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/__init__.cpython-314.pyc,,
|
|
||||||
pip/_vendor/cachecontrol/caches/redis_cache.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/__pycache__,,
|
|
||||||
pip/_internal/locations/base.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/__pycache__,,
|
|
||||||
pip/_vendor/requests/_internal_utils.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/commands/search.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/exceptions.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/index.cpython-314.pyc,,
|
|
||||||
pip/_internal/resolution/resolvelib/base.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/temp_dir.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/live.cpython-314.pyc,,
|
|
||||||
pip/_vendor/packaging/specifiers.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/console.cpython-314.pyc,,
|
|
||||||
pip/_vendor/platformdirs/version.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/importlib/_envs.cpython-314.pyc,,
|
|
||||||
pip/_internal/req/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/vcs/bazaar.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/util/retry.cpython-314.pyc,,
|
|
||||||
pip/_internal/metadata/importlib/_compat.cpython-314.pyc,,
|
|
||||||
pip/_vendor/pygments/lexers/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/req/req_set.cpython-314.pyc,,
|
|
||||||
pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/__pycache__,,
|
|
||||||
pip/_internal/commands/help.cpython-314.pyc,,
|
|
||||||
pip/_vendor/urllib3/filepost.cpython-314.pyc,,
|
|
||||||
pip/_vendor/requests/structures.cpython-314.pyc,,
|
|
||||||
pip/_vendor/rich/spinner.cpython-314.pyc,,
|
|
||||||
pip/_internal/models/release_control.cpython-314.pyc,,
|
|
||||||
pip/_internal/distributions/__pycache__,,
|
|
||||||
pip/_vendor/rich/traceback.cpython-314.pyc,,
|
|
||||||
pip/_internal/operations/build/__init__.cpython-314.pyc,,
|
|
||||||
pip/_internal/utils/pylock.cpython-314.pyc,,
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
Wheel-Version: 1.0
|
|
||||||
Generator: flit 3.12.0
|
|
||||||
Root-Is-Purelib: true
|
|
||||||
Tag: py3-none-any
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
[console_scripts]
|
|
||||||
pip=pip._internal.cli.main:main
|
|
||||||
pip3=pip._internal.cli.main:main
|
|
||||||
|
|
||||||
@@ -1,860 +0,0 @@
|
|||||||
@Switch01
|
|
||||||
A_Rog
|
|
||||||
Aakanksha Agrawal
|
|
||||||
Aarni Koskela
|
|
||||||
Abhinav Sagar
|
|
||||||
ABHYUDAY PRATAP SINGH
|
|
||||||
abs51295
|
|
||||||
AceGentile
|
|
||||||
Adam Chainz
|
|
||||||
Adam Tse
|
|
||||||
Adam Turner
|
|
||||||
Adam Wentz
|
|
||||||
admin
|
|
||||||
Adolfo Ochagavía
|
|
||||||
Adrien Morison
|
|
||||||
Agus
|
|
||||||
ahayrapetyan
|
|
||||||
Ahilya
|
|
||||||
AinsworthK
|
|
||||||
Akash Srivastava
|
|
||||||
Alan Yee
|
|
||||||
Albert Tugushev
|
|
||||||
Albert-Guan
|
|
||||||
albertg
|
|
||||||
Alberto Sottile
|
|
||||||
Aleks Bunin
|
|
||||||
Ales Erjavec
|
|
||||||
Alessandro Molina
|
|
||||||
Alethea Flowers
|
|
||||||
Alex Gaynor
|
|
||||||
Alex Grönholm
|
|
||||||
Alex Hedges
|
|
||||||
Alex Loosley
|
|
||||||
Alex Morega
|
|
||||||
Alex Stachowiak
|
|
||||||
Alexander Regueiro
|
|
||||||
Alexander Shtyrov
|
|
||||||
Alexandre Conrad
|
|
||||||
Alexey Popravka
|
|
||||||
Aleš Erjavec
|
|
||||||
Alli
|
|
||||||
Aman
|
|
||||||
Ami Fischman
|
|
||||||
Ananya Maiti
|
|
||||||
Anatoly Techtonik
|
|
||||||
Anders Kaseorg
|
|
||||||
Andre Aguiar
|
|
||||||
Andreas Lutro
|
|
||||||
Andrei Geacar
|
|
||||||
Andrew Gaul
|
|
||||||
Andrew Shymanel
|
|
||||||
Andrey Bienkowski
|
|
||||||
Andrey Bulgakov
|
|
||||||
Andrés Delfino
|
|
||||||
Andy Freeland
|
|
||||||
Andy Kluger
|
|
||||||
Ani Hayrapetyan
|
|
||||||
Aniruddha Basak
|
|
||||||
Anish Tambe
|
|
||||||
Anrs Hu
|
|
||||||
Anthony Sottile
|
|
||||||
Antoine Lambert
|
|
||||||
Antoine Musso
|
|
||||||
Anton Ovchinnikov
|
|
||||||
Anton Patrushev
|
|
||||||
Anton Zelenov
|
|
||||||
Antonio Alvarado Hernandez
|
|
||||||
Antony Lee
|
|
||||||
Antti Kaihola
|
|
||||||
Anubhav Patel
|
|
||||||
Anudit Nagar
|
|
||||||
Anuj Godase
|
|
||||||
AQNOUCH Mohammed
|
|
||||||
AraHaan
|
|
||||||
arena
|
|
||||||
arenasys
|
|
||||||
Arindam Choudhury
|
|
||||||
Armin Ronacher
|
|
||||||
Arnon Yaari
|
|
||||||
Artem
|
|
||||||
Arun Babu Neelicattu
|
|
||||||
Ashley Manton
|
|
||||||
Ashwin Ramaswami
|
|
||||||
atse
|
|
||||||
Atsushi Odagiri
|
|
||||||
Avinash Karhana
|
|
||||||
Avner Cohen
|
|
||||||
Awit (Ah-Wit) Ghirmai
|
|
||||||
Baptiste Mispelon
|
|
||||||
Barney Gale
|
|
||||||
barneygale
|
|
||||||
Bartek Ogryczak
|
|
||||||
Bastian Venthur
|
|
||||||
Ben Bodenmiller
|
|
||||||
Ben Darnell
|
|
||||||
Ben Hoyt
|
|
||||||
Ben Mares
|
|
||||||
Ben Rosser
|
|
||||||
Bence Nagy
|
|
||||||
Benjamin Peterson
|
|
||||||
Benjamin VanEvery
|
|
||||||
Benoit Pierre
|
|
||||||
Berker Peksag
|
|
||||||
Bernard
|
|
||||||
Bernard Tyers
|
|
||||||
Bernardo B. Marques
|
|
||||||
Bernhard M. Wiedemann
|
|
||||||
Bertil Hatt
|
|
||||||
Bhavam Vidyarthi
|
|
||||||
Blazej Michalik
|
|
||||||
Bogdan Opanchuk
|
|
||||||
BorisZZZ
|
|
||||||
Brad Erickson
|
|
||||||
Bradley Ayers
|
|
||||||
Bradley Reynolds
|
|
||||||
Branch Vincent
|
|
||||||
Brandon L. Reiss
|
|
||||||
Brandt Bucher
|
|
||||||
Brannon Dorsey
|
|
||||||
Brett Randall
|
|
||||||
Brett Rosen
|
|
||||||
Brian Cristante
|
|
||||||
Brian Rosner
|
|
||||||
briantracy
|
|
||||||
BrownTruck
|
|
||||||
Bruno Oliveira
|
|
||||||
Bruno Renié
|
|
||||||
Bruno S
|
|
||||||
Bstrdsmkr
|
|
||||||
Buck Golemon
|
|
||||||
burrows
|
|
||||||
Bussonnier Matthias
|
|
||||||
bwoodsend
|
|
||||||
c22
|
|
||||||
Caleb Brown
|
|
||||||
Caleb Martinez
|
|
||||||
Calvin Smith
|
|
||||||
Carl Meyer
|
|
||||||
Carlos Liam
|
|
||||||
Carol Willing
|
|
||||||
Carter Thayer
|
|
||||||
Cass
|
|
||||||
Chandrasekhar Atina
|
|
||||||
Charlie Marsh
|
|
||||||
charwick
|
|
||||||
Chih-Hsuan Yen
|
|
||||||
Chris Brinker
|
|
||||||
Chris Hunt
|
|
||||||
Chris Jerdonek
|
|
||||||
Chris Kuehl
|
|
||||||
Chris Markiewicz
|
|
||||||
Chris McDonough
|
|
||||||
Chris Pawley
|
|
||||||
Chris Pryer
|
|
||||||
Chris Wolfe
|
|
||||||
Christian Clauss
|
|
||||||
Christian Heimes
|
|
||||||
Christian Oudard
|
|
||||||
Christoph Reiter
|
|
||||||
Christopher Hunt
|
|
||||||
Christopher Snyder
|
|
||||||
chrysle
|
|
||||||
cjc7373
|
|
||||||
Clark Boylan
|
|
||||||
Claudio Jolowicz
|
|
||||||
Clay McClure
|
|
||||||
Cody
|
|
||||||
Cody Soyland
|
|
||||||
Colin Watson
|
|
||||||
Collin Anderson
|
|
||||||
Connor Osborn
|
|
||||||
Cooper Lees
|
|
||||||
Cooper Ry Lees
|
|
||||||
Cory Benfield
|
|
||||||
Cory Wright
|
|
||||||
Craig Kerstiens
|
|
||||||
Cristian Sorinel
|
|
||||||
Cristina
|
|
||||||
Cristina Muñoz
|
|
||||||
ctg123
|
|
||||||
Curtis Doty
|
|
||||||
cytolentino
|
|
||||||
Daan De Meyer
|
|
||||||
Dale
|
|
||||||
Damian
|
|
||||||
Damian Quiroga
|
|
||||||
Damian Shaw
|
|
||||||
Dan Black
|
|
||||||
Dan Savilonis
|
|
||||||
Dan Sully
|
|
||||||
Dane Hillard
|
|
||||||
daniel
|
|
||||||
Daniel Collins
|
|
||||||
Daniel Hahler
|
|
||||||
Daniel Hollas
|
|
||||||
Daniel Holth
|
|
||||||
Daniel Jost
|
|
||||||
Daniel Katz
|
|
||||||
Daniel Shaulov
|
|
||||||
Daniele Esposti
|
|
||||||
Daniele Nicolodi
|
|
||||||
Daniele Procida
|
|
||||||
Daniil Konovalenko
|
|
||||||
Danny Hermes
|
|
||||||
Danny McClanahan
|
|
||||||
Darren Kavanagh
|
|
||||||
Dav Clark
|
|
||||||
Dave Abrahams
|
|
||||||
Dave Jones
|
|
||||||
David Aguilar
|
|
||||||
David Black
|
|
||||||
David Bordeynik
|
|
||||||
David Caro
|
|
||||||
David D Lowe
|
|
||||||
David Evans
|
|
||||||
David Hewitt
|
|
||||||
David Linke
|
|
||||||
David Poggi
|
|
||||||
David Poznik
|
|
||||||
David Pursehouse
|
|
||||||
David Runge
|
|
||||||
David Tucker
|
|
||||||
David Wales
|
|
||||||
Davidovich
|
|
||||||
ddelange
|
|
||||||
Deepak Sharma
|
|
||||||
Deepyaman Datta
|
|
||||||
Denis Roussel (ACSONE)
|
|
||||||
Denise Yu
|
|
||||||
dependabot[bot]
|
|
||||||
derwolfe
|
|
||||||
Desetude
|
|
||||||
developer
|
|
||||||
Devesh Kumar
|
|
||||||
Devesh Kumar Singh
|
|
||||||
devsagul
|
|
||||||
Diego Caraballo
|
|
||||||
Diego Ramirez
|
|
||||||
DiegoCaraballo
|
|
||||||
Dimitri Merejkowsky
|
|
||||||
Dimitri Papadopoulos
|
|
||||||
Dimitri Papadopoulos Orfanos
|
|
||||||
Dirk Stolle
|
|
||||||
dkjsone
|
|
||||||
Dmitry Gladkov
|
|
||||||
Dmitry Volodin
|
|
||||||
Domen Kožar
|
|
||||||
Dominic Davis-Foster
|
|
||||||
Donald Stufft
|
|
||||||
Dongweiming
|
|
||||||
doron zarhi
|
|
||||||
Dos Moonen
|
|
||||||
Douglas Thor
|
|
||||||
DrFeathers
|
|
||||||
Dustin Ingram
|
|
||||||
Dustin Rodrigues
|
|
||||||
Dwayne Bailey
|
|
||||||
Ed Morley
|
|
||||||
Edgar Ramírez
|
|
||||||
Edgar Ramírez Mondragón
|
|
||||||
Ee Durbin
|
|
||||||
Efflam Lemaillet
|
|
||||||
efflamlemaillet
|
|
||||||
Eitan Adler
|
|
||||||
ekristina
|
|
||||||
elainechan
|
|
||||||
Eli Schwartz
|
|
||||||
Elisha Hollander
|
|
||||||
Ellen Marie Dash
|
|
||||||
Emil Burzo
|
|
||||||
Emil Styrke
|
|
||||||
Emmanuel Arias
|
|
||||||
Endoh Takanao
|
|
||||||
enoch
|
|
||||||
Erdinc Mutlu
|
|
||||||
Eric Cousineau
|
|
||||||
Eric Gillingham
|
|
||||||
Eric Hanchrow
|
|
||||||
Eric Hopper
|
|
||||||
Erik M. Bray
|
|
||||||
Erik Rose
|
|
||||||
Erwin Janssen
|
|
||||||
Eugene Vereshchagin
|
|
||||||
everdimension
|
|
||||||
Federico
|
|
||||||
Felipe Peter
|
|
||||||
Felix Yan
|
|
||||||
fiber-space
|
|
||||||
Filip Kokosiński
|
|
||||||
Filipe Laíns
|
|
||||||
Finn Womack
|
|
||||||
finnagin
|
|
||||||
Flavio Amurrio
|
|
||||||
Florian Briand
|
|
||||||
Florian Rathgeber
|
|
||||||
Francesco
|
|
||||||
Francesco Montesano
|
|
||||||
Fredrik Orderud
|
|
||||||
Fredrik Roubert
|
|
||||||
Frost Ming
|
|
||||||
Gabriel Curio
|
|
||||||
Gabriel de Perthuis
|
|
||||||
Garry Polley
|
|
||||||
gavin
|
|
||||||
gdanielson
|
|
||||||
Gene Wood
|
|
||||||
Geoffrey Sneddon
|
|
||||||
George Margaritis
|
|
||||||
George Song
|
|
||||||
Georgi Valkov
|
|
||||||
Georgy Pchelkin
|
|
||||||
ghost
|
|
||||||
Giftlin Rajaiah
|
|
||||||
gizmoguy1
|
|
||||||
gkdoc
|
|
||||||
Godefroid Chapelle
|
|
||||||
Gopinath M
|
|
||||||
GOTO Hayato
|
|
||||||
gousaiyang
|
|
||||||
gpiks
|
|
||||||
Greg Roodt
|
|
||||||
Greg Ward
|
|
||||||
Guido Diepen
|
|
||||||
Guilherme Espada
|
|
||||||
Guillaume Seguin
|
|
||||||
gutsytechster
|
|
||||||
Guy Rozendorn
|
|
||||||
Guy Tuval
|
|
||||||
gzpan123
|
|
||||||
Hanjun Kim
|
|
||||||
Hari Charan
|
|
||||||
Harsh Vardhan
|
|
||||||
Harsha Sai
|
|
||||||
harupy
|
|
||||||
Harutaka Kawamura
|
|
||||||
Hasan-8326
|
|
||||||
hauntsaninja
|
|
||||||
Henrich Hartzer
|
|
||||||
Henry Schreiner
|
|
||||||
Herbert Pfennig
|
|
||||||
Holly Stotelmyer
|
|
||||||
Honnix
|
|
||||||
Hsiaoming Yang
|
|
||||||
Hugo Lopes Tavares
|
|
||||||
Hugo van Kemenade
|
|
||||||
Hugues Bruant
|
|
||||||
Hynek Schlawack
|
|
||||||
iamsrp-deshaw
|
|
||||||
Ian Bicking
|
|
||||||
Ian Cordasco
|
|
||||||
Ian Lee
|
|
||||||
Ian Stapleton Cordasco
|
|
||||||
Ian Wienand
|
|
||||||
Igor Kuzmitshov
|
|
||||||
Igor Sobreira
|
|
||||||
Ikko Ashimine
|
|
||||||
Ilan Schnell
|
|
||||||
Illia Volochii
|
|
||||||
Ilya Abdolmanafi
|
|
||||||
Ilya Baryshev
|
|
||||||
Inada Naoki
|
|
||||||
Ionel Cristian Mărieș
|
|
||||||
Ionel Maries Cristian
|
|
||||||
Itamar Turner-Trauring
|
|
||||||
iTrooz
|
|
||||||
Ivan Pozdeev
|
|
||||||
J. Nick Koston
|
|
||||||
Jacob Kim
|
|
||||||
Jacob Walls
|
|
||||||
Jaime Sanz
|
|
||||||
Jake Lishman
|
|
||||||
jakirkham
|
|
||||||
Jakub Kuczys
|
|
||||||
Jakub Stasiak
|
|
||||||
Jakub Vysoky
|
|
||||||
Jakub Wilk
|
|
||||||
James
|
|
||||||
James Cleveland
|
|
||||||
James Curtin
|
|
||||||
James Firth
|
|
||||||
James Gerity
|
|
||||||
James Polley
|
|
||||||
Jan Pokorný
|
|
||||||
Jannis Leidel
|
|
||||||
Jarek Potiuk
|
|
||||||
jarondl
|
|
||||||
Jason Curtis
|
|
||||||
Jason R. Coombs
|
|
||||||
JasonMo
|
|
||||||
JasonMo1
|
|
||||||
Jay Graves
|
|
||||||
Jean Abou Samra
|
|
||||||
Jean-Christophe Fillion-Robin
|
|
||||||
Jeff Barber
|
|
||||||
Jeff Dairiki
|
|
||||||
Jeff Widman
|
|
||||||
Jelmer Vernooij
|
|
||||||
jenix21
|
|
||||||
Jeremy Fleischman
|
|
||||||
Jeremy Stanley
|
|
||||||
Jeremy Zafran
|
|
||||||
Jesse Rittner
|
|
||||||
Jiashuo Li
|
|
||||||
Jim Fisher
|
|
||||||
Jim Garrison
|
|
||||||
Jinzhe Zeng
|
|
||||||
Jiun Bae
|
|
||||||
Jivan Amara
|
|
||||||
Joa
|
|
||||||
Joe Bylund
|
|
||||||
Joe Michelini
|
|
||||||
Johannes Altmanninger
|
|
||||||
John Paton
|
|
||||||
John Sirois
|
|
||||||
John T. Wodder II
|
|
||||||
John-Scott Atlakson
|
|
||||||
johnthagen
|
|
||||||
Jon Banafato
|
|
||||||
Jon Dufresne
|
|
||||||
Jon Parise
|
|
||||||
Jonas Nockert
|
|
||||||
Jonathan Herbert
|
|
||||||
Joonatan Partanen
|
|
||||||
Joost Molenaar
|
|
||||||
Jorge Niedbalski
|
|
||||||
Joseph Bylund
|
|
||||||
Joseph Long
|
|
||||||
Josh Bronson
|
|
||||||
Josh Cannon
|
|
||||||
Josh Hansen
|
|
||||||
Josh Schneier
|
|
||||||
Joshua
|
|
||||||
JoshuaPerdue
|
|
||||||
Jost Migenda
|
|
||||||
Juan Luis Cano Rodríguez
|
|
||||||
Juanjo Bazán
|
|
||||||
Judah Rand
|
|
||||||
Julian Berman
|
|
||||||
Julian Gethmann
|
|
||||||
Julien Demoor
|
|
||||||
Julien Stephan
|
|
||||||
July Tikhonov
|
|
||||||
Jussi Kukkonen
|
|
||||||
Justin van Heek
|
|
||||||
jwg4
|
|
||||||
Jyrki Pulliainen
|
|
||||||
Kai Chen
|
|
||||||
Kai Mueller
|
|
||||||
Kamal Bin Mustafa
|
|
||||||
Karolina Surma
|
|
||||||
kasium
|
|
||||||
kaustav haldar
|
|
||||||
Kaz Nishimura
|
|
||||||
keanemind
|
|
||||||
Keith Maxwell
|
|
||||||
Kelsey Hightower
|
|
||||||
Kenneth Belitzky
|
|
||||||
Kenneth Reitz
|
|
||||||
Kevin Burke
|
|
||||||
Kevin Carter
|
|
||||||
Kevin Frommelt
|
|
||||||
Kevin R Patterson
|
|
||||||
Kexuan Sun
|
|
||||||
Kit Randel
|
|
||||||
Klaas van Schelven
|
|
||||||
KOLANICH
|
|
||||||
konstin
|
|
||||||
kpinc
|
|
||||||
Krishan Bhasin
|
|
||||||
Krishna Oza
|
|
||||||
Kumar McMillan
|
|
||||||
Kuntal Majumder
|
|
||||||
Kurt McKee
|
|
||||||
Kyle Persohn
|
|
||||||
lakshmanaram
|
|
||||||
Laszlo Kiss-Kollar
|
|
||||||
Laurent Bristiel
|
|
||||||
Laurent LAPORTE
|
|
||||||
Laurie O
|
|
||||||
Laurie Opperman
|
|
||||||
layday
|
|
||||||
Leon Sasson
|
|
||||||
Lev Givon
|
|
||||||
Lincoln de Sousa
|
|
||||||
Lipis
|
|
||||||
lorddavidiii
|
|
||||||
Loren Carvalho
|
|
||||||
Lucas Cimon
|
|
||||||
Ludovic Gasc
|
|
||||||
Luis Medel
|
|
||||||
Lukas Geiger
|
|
||||||
Lukas Juhrich
|
|
||||||
Luke Macken
|
|
||||||
Luo Jiebin
|
|
||||||
luojiebin
|
|
||||||
luz.paz
|
|
||||||
László Kiss Kollár
|
|
||||||
M00nL1ght
|
|
||||||
MajorTanya
|
|
||||||
Malcolm Smith
|
|
||||||
Marc Abramowitz
|
|
||||||
Marc Tamlyn
|
|
||||||
Marcus Smith
|
|
||||||
Mariatta
|
|
||||||
Mark Kohler
|
|
||||||
Mark McLoughlin
|
|
||||||
Mark Williams
|
|
||||||
Markus Hametner
|
|
||||||
Martey Dodoo
|
|
||||||
Martin Fischer
|
|
||||||
Martin Häcker
|
|
||||||
Martin Pavlasek
|
|
||||||
Masaki
|
|
||||||
Masklinn
|
|
||||||
Matej Stuchlik
|
|
||||||
Mateusz Sokół
|
|
||||||
Mathew Jennings
|
|
||||||
Mathieu Bridon
|
|
||||||
Mathieu Kniewallner
|
|
||||||
Matt Bacchi
|
|
||||||
Matt Good
|
|
||||||
Matt Maker
|
|
||||||
Matt Robenolt
|
|
||||||
Matt Wozniski
|
|
||||||
matthew
|
|
||||||
Matthew Einhorn
|
|
||||||
Matthew Feickert
|
|
||||||
Matthew Gilliard
|
|
||||||
Matthew Hughes
|
|
||||||
Matthew Iversen
|
|
||||||
Matthew Treinish
|
|
||||||
Matthew Trumbell
|
|
||||||
Matthew Willson
|
|
||||||
Matthias Bussonnier
|
|
||||||
mattip
|
|
||||||
Maurits van Rees
|
|
||||||
Max W Chase
|
|
||||||
Maxim Kurnikov
|
|
||||||
Maxime Rouyrre
|
|
||||||
mayeut
|
|
||||||
mbaluna
|
|
||||||
Md Sujauddin Sekh
|
|
||||||
mdebi
|
|
||||||
Meet Vasita
|
|
||||||
memoselyk
|
|
||||||
meowmeowcat
|
|
||||||
Michael
|
|
||||||
Michael Aquilina
|
|
||||||
Michael E. Karpeles
|
|
||||||
Michael Klich
|
|
||||||
Michael Mintz
|
|
||||||
Michael Williamson
|
|
||||||
michaelpacer
|
|
||||||
Michał Górny
|
|
||||||
Mickaël Schoentgen
|
|
||||||
Miguel Araujo Perez
|
|
||||||
Mihir Singh
|
|
||||||
Mike
|
|
||||||
Mike Hendricks
|
|
||||||
Min RK
|
|
||||||
MinRK
|
|
||||||
Miro Hrončok
|
|
||||||
Monica Baluna
|
|
||||||
montefra
|
|
||||||
Monty Taylor
|
|
||||||
morotti
|
|
||||||
mrKazzila
|
|
||||||
Muha Ajjan
|
|
||||||
MUTHUSRIHEMADHARSHINI S A
|
|
||||||
Nadav Wexler
|
|
||||||
Nahuel Ambrosini
|
|
||||||
Nate Coraor
|
|
||||||
Nate Prewitt
|
|
||||||
Nathan Houghton
|
|
||||||
Nathaniel J. Smith
|
|
||||||
Nehal J Wani
|
|
||||||
Neil Botelho
|
|
||||||
Nguyễn Gia Phong
|
|
||||||
Nicholas Serra
|
|
||||||
Nick Coghlan
|
|
||||||
Nick Stenning
|
|
||||||
Nick Timkovich
|
|
||||||
Nicolas Bock
|
|
||||||
Nicole Harris
|
|
||||||
Nikhil Benesch
|
|
||||||
Nikhil Ladha
|
|
||||||
Nikita Chepanov
|
|
||||||
Nikolay Korolev
|
|
||||||
Nipunn Koorapati
|
|
||||||
Nitesh Sharma
|
|
||||||
Niyas Sait
|
|
||||||
Noah
|
|
||||||
Noah Gorny
|
|
||||||
Nothing-991
|
|
||||||
Nowell Strite
|
|
||||||
NtaleGrey
|
|
||||||
nucccc
|
|
||||||
nvdv
|
|
||||||
OBITORASU
|
|
||||||
Ofek Lev
|
|
||||||
ofrinevo
|
|
||||||
Oleg Burnaev
|
|
||||||
Oliver Freund
|
|
||||||
Oliver Jeeves
|
|
||||||
Oliver Mannion
|
|
||||||
Oliver Tonnhofer
|
|
||||||
Olivier Girardot
|
|
||||||
Olivier Grisel
|
|
||||||
Ollie Rutherfurd
|
|
||||||
OMOTO Kenji
|
|
||||||
Omry Yadan
|
|
||||||
onlinejudge95
|
|
||||||
Oren Held
|
|
||||||
Oscar Benjamin
|
|
||||||
oxygen dioxide
|
|
||||||
Oz N Tiram
|
|
||||||
Pachwenko
|
|
||||||
Paresh Joshi
|
|
||||||
Patrick Dubroy
|
|
||||||
Patrick Jenkins
|
|
||||||
Patrick Lawson
|
|
||||||
patricktokeeffe
|
|
||||||
Patrik Kopkan
|
|
||||||
Paul Ganssle
|
|
||||||
Paul Kehrer
|
|
||||||
Paul Moore
|
|
||||||
Paul Nasrat
|
|
||||||
Paul Oswald
|
|
||||||
Paul van der Linden
|
|
||||||
Paulus Schoutsen
|
|
||||||
Pavel Safronov
|
|
||||||
Pavithra Eswaramoorthy
|
|
||||||
Pawel Jasinski
|
|
||||||
Paweł Szramowski
|
|
||||||
Pekka Klärck
|
|
||||||
Peter Gessler
|
|
||||||
Peter Lisák
|
|
||||||
Peter Shen
|
|
||||||
Peter Waller
|
|
||||||
Petr Viktorin
|
|
||||||
petr-tik
|
|
||||||
Phaneendra Chiruvella
|
|
||||||
Phil Elson
|
|
||||||
Phil Freo
|
|
||||||
Phil Pennock
|
|
||||||
Phil Whelan
|
|
||||||
Philip Jägenstedt
|
|
||||||
Philip Molloy
|
|
||||||
Philippe Ombredanne
|
|
||||||
Pi Delport
|
|
||||||
Pierre-Yves Rofes
|
|
||||||
Pieter Degroote
|
|
||||||
pip
|
|
||||||
Prabakaran Kumaresshan
|
|
||||||
Prabhjyotsing Surjit Singh Sodhi
|
|
||||||
Prabhu Marappan
|
|
||||||
Pradyun Gedam
|
|
||||||
Prashant Sharma
|
|
||||||
Pratik Mallya
|
|
||||||
pre-commit-ci[bot]
|
|
||||||
Preet Thakkar
|
|
||||||
Preston Holmes
|
|
||||||
Przemek Wrzos
|
|
||||||
Pulkit Goyal
|
|
||||||
q0w
|
|
||||||
Qiangning Hong
|
|
||||||
Qiming Xu
|
|
||||||
qraqras
|
|
||||||
Quentin Lee
|
|
||||||
Quentin Pradet
|
|
||||||
R. David Murray
|
|
||||||
Rafael Caricio
|
|
||||||
Ralf Schmitt
|
|
||||||
Ran Benita
|
|
||||||
Randy Döring
|
|
||||||
Razzi Abuissa
|
|
||||||
rdb
|
|
||||||
Reece Dunham
|
|
||||||
Remi Rampin
|
|
||||||
Rene Dudfield
|
|
||||||
Riccardo Magliocchetti
|
|
||||||
Riccardo Schirone
|
|
||||||
Richard Jones
|
|
||||||
Richard Si
|
|
||||||
Ricky Ng-Adam
|
|
||||||
Rishi
|
|
||||||
rmorotti
|
|
||||||
RobberPhex
|
|
||||||
Robert Collins
|
|
||||||
Robert McGibbon
|
|
||||||
Robert Pollak
|
|
||||||
Robert T. McGibbon
|
|
||||||
robin elisha robinson
|
|
||||||
Rodney, Tiara
|
|
||||||
Roey Berman
|
|
||||||
Rohan Jain
|
|
||||||
Roman Bogorodskiy
|
|
||||||
Roman Donchenko
|
|
||||||
Romuald Brunet
|
|
||||||
ronaudinho
|
|
||||||
Ronny Pfannschmidt
|
|
||||||
Rory McCann
|
|
||||||
Ross Brattain
|
|
||||||
Roy Wellington Ⅳ
|
|
||||||
Ruairidh MacLeod
|
|
||||||
Russell Keith-Magee
|
|
||||||
Ryan Shepherd
|
|
||||||
Ryan Wooden
|
|
||||||
ryneeverett
|
|
||||||
Ryuma Asai
|
|
||||||
S. Guliaev
|
|
||||||
Sachi King
|
|
||||||
Salvatore Rinchiera
|
|
||||||
sandeepkiran-js
|
|
||||||
Sander Van Balen
|
|
||||||
Savio Jomton
|
|
||||||
schlamar
|
|
||||||
Scott Kitterman
|
|
||||||
Sean
|
|
||||||
seanj
|
|
||||||
Sebastian Jordan
|
|
||||||
Sebastian Schaetz
|
|
||||||
Segev Finer
|
|
||||||
SeongSoo Cho
|
|
||||||
Sepehr Rasouli
|
|
||||||
sepehrrasooli
|
|
||||||
Sergey Vasilyev
|
|
||||||
Seth Michael Larson
|
|
||||||
Seth Woodworth
|
|
||||||
Shahar Epstein
|
|
||||||
Shantanu
|
|
||||||
shenxianpeng
|
|
||||||
shireenrao
|
|
||||||
Shivansh-007
|
|
||||||
Shixian Sheng
|
|
||||||
Shlomi Fish
|
|
||||||
Shovan Maity
|
|
||||||
Shubham Nagure
|
|
||||||
Simeon Visser
|
|
||||||
Simon Cross
|
|
||||||
Simon Pichugin
|
|
||||||
sinoroc
|
|
||||||
sinscary
|
|
||||||
snook92
|
|
||||||
socketubs
|
|
||||||
Sorin Sbarnea
|
|
||||||
Srinivas Nyayapati
|
|
||||||
Srishti Hegde
|
|
||||||
Stavros Korokithakis
|
|
||||||
Stefan Scherfke
|
|
||||||
Stefano Rivera
|
|
||||||
Stephan Erb
|
|
||||||
Stephane Chazelas
|
|
||||||
Stephen Payne
|
|
||||||
Stephen Rosen
|
|
||||||
stepshal
|
|
||||||
Steve (Gadget) Barnes
|
|
||||||
Steve Barnes
|
|
||||||
Steve Dower
|
|
||||||
Steve Kowalik
|
|
||||||
Steven Myint
|
|
||||||
Steven Silvester
|
|
||||||
stonebig
|
|
||||||
studioj
|
|
||||||
Stéphane Bidoul
|
|
||||||
Stéphane Bidoul (ACSONE)
|
|
||||||
Stéphane Klein
|
|
||||||
Sumana Harihareswara
|
|
||||||
Surbhi Sharma
|
|
||||||
Sviatoslav Sydorenko
|
|
||||||
Sviatoslav Sydorenko (Святослав Сидоренко)
|
|
||||||
Swat009
|
|
||||||
Sylvain
|
|
||||||
Takayuki SHIMIZUKAWA
|
|
||||||
Taneli Hukkinen
|
|
||||||
tbeswick
|
|
||||||
Terrance
|
|
||||||
Thiago
|
|
||||||
Thijs Triemstra
|
|
||||||
Thomas Fenzl
|
|
||||||
Thomas Grainger
|
|
||||||
Thomas Guettler
|
|
||||||
Thomas Johansson
|
|
||||||
Thomas Kluyver
|
|
||||||
Thomas Smith
|
|
||||||
Thomas VINCENT
|
|
||||||
Tim D. Smith
|
|
||||||
Tim Gates
|
|
||||||
Tim Harder
|
|
||||||
Tim Heap
|
|
||||||
tim smith
|
|
||||||
tinruufu
|
|
||||||
Tobias Hermann
|
|
||||||
Tom Forbes
|
|
||||||
Tom Freudenheim
|
|
||||||
Tom V
|
|
||||||
Tomas Hrnciar
|
|
||||||
Tomas Orsava
|
|
||||||
Tomer Chachamu
|
|
||||||
Tommi Enenkel | AnB
|
|
||||||
Tomáš Hrnčiar
|
|
||||||
Tony Beswick
|
|
||||||
Tony Narlock
|
|
||||||
Tony Zhaocheng Tan
|
|
||||||
TonyBeswick
|
|
||||||
toonarmycaptain
|
|
||||||
Toshio Kuratomi
|
|
||||||
toxinu
|
|
||||||
Travis Swicegood
|
|
||||||
Tushar Sadhwani
|
|
||||||
Tzu-ping Chung
|
|
||||||
Valentin Haenel
|
|
||||||
Victor Stinner
|
|
||||||
victorvpaulo
|
|
||||||
Vikram - Google
|
|
||||||
Viktor Szépe
|
|
||||||
Ville Skyttä
|
|
||||||
Vinay Sajip
|
|
||||||
Vincent Philippon
|
|
||||||
Vinicyus Macedo
|
|
||||||
Vipul Kumar
|
|
||||||
Vitaly Babiy
|
|
||||||
Vladimir Fokow
|
|
||||||
Vladimir Rutsky
|
|
||||||
W. Trevor King
|
|
||||||
Weida Hong
|
|
||||||
Wil Tan
|
|
||||||
Wilfred Hughes
|
|
||||||
William Edwards
|
|
||||||
William ML Leslie
|
|
||||||
William T Olson
|
|
||||||
William Woodruff
|
|
||||||
Wilson Mo
|
|
||||||
wim glenn
|
|
||||||
Winson Luk
|
|
||||||
Wolfgang Maier
|
|
||||||
Wu Zhenyu
|
|
||||||
XAMES3
|
|
||||||
Xavier Fernandez
|
|
||||||
Xianpeng Shen
|
|
||||||
xoviat
|
|
||||||
xtreak
|
|
||||||
YAMAMOTO Takashi
|
|
||||||
Yash
|
|
||||||
Yashraj
|
|
||||||
Yen Chi Hsuan
|
|
||||||
Yeray Diaz Diaz
|
|
||||||
Yoval P
|
|
||||||
Yu Jian
|
|
||||||
Yuan Jing Vincent Yan
|
|
||||||
Yuki Kobayashi
|
|
||||||
Yusuke Hayashi
|
|
||||||
zackzack38
|
|
||||||
Zearin
|
|
||||||
Zhiping Deng
|
|
||||||
ziebam
|
|
||||||
Zvezdan Petkovic
|
|
||||||
Łukasz Langa
|
|
||||||
Роман Донченко
|
|
||||||
Семён Марьясин
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
Copyright (c) 2008-present The pip developers (see AUTHORS.txt file)
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
Copyright 2012-2021 Eric Larson
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
This package contains a modified version of ca-bundle.crt:
|
|
||||||
|
|
||||||
ca-bundle.crt -- Bundle of CA Root Certificates
|
|
||||||
|
|
||||||
This is a bundle of X.509 certificates of public Certificate Authorities
|
|
||||||
(CA). These were automatically extracted from Mozilla's root certificates
|
|
||||||
file (certdata.txt). This file can be found in the mozilla source tree:
|
|
||||||
https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt
|
|
||||||
It contains the certificates in PEM format and therefore
|
|
||||||
can be directly used with curl / libcurl / php_curl, or with
|
|
||||||
an Apache+mod_ssl webserver for SSL client authentication.
|
|
||||||
Just configure this file as the SSLCACertificateFile.#
|
|
||||||
|
|
||||||
***** BEGIN LICENSE BLOCK *****
|
|
||||||
This Source Code Form is subject to the terms of the Mozilla Public License,
|
|
||||||
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
|
|
||||||
one at http://mozilla.org/MPL/2.0/.
|
|
||||||
|
|
||||||
***** END LICENSE BLOCK *****
|
|
||||||
@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2024-present Stephen Rosen <sirosen0@gmail.com>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
-284
@@ -1,284 +0,0 @@
|
|||||||
A. HISTORY OF THE SOFTWARE
|
|
||||||
==========================
|
|
||||||
|
|
||||||
Python was created in the early 1990s by Guido van Rossum at Stichting
|
|
||||||
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
|
|
||||||
as a successor of a language called ABC. Guido remains Python's
|
|
||||||
principal author, although it includes many contributions from others.
|
|
||||||
|
|
||||||
In 1995, Guido continued his work on Python at the Corporation for
|
|
||||||
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
|
|
||||||
in Reston, Virginia where he released several versions of the
|
|
||||||
software.
|
|
||||||
|
|
||||||
In May 2000, Guido and the Python core development team moved to
|
|
||||||
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
|
|
||||||
year, the PythonLabs team moved to Digital Creations (now Zope
|
|
||||||
Corporation, see http://www.zope.com). In 2001, the Python Software
|
|
||||||
Foundation (PSF, see http://www.python.org/psf/) was formed, a
|
|
||||||
non-profit organization created specifically to own Python-related
|
|
||||||
Intellectual Property. Zope Corporation is a sponsoring member of
|
|
||||||
the PSF.
|
|
||||||
|
|
||||||
All Python releases are Open Source (see http://www.opensource.org for
|
|
||||||
the Open Source Definition). Historically, most, but not all, Python
|
|
||||||
releases have also been GPL-compatible; the table below summarizes
|
|
||||||
the various releases.
|
|
||||||
|
|
||||||
Release Derived Year Owner GPL-
|
|
||||||
from compatible? (1)
|
|
||||||
|
|
||||||
0.9.0 thru 1.2 1991-1995 CWI yes
|
|
||||||
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
|
|
||||||
1.6 1.5.2 2000 CNRI no
|
|
||||||
2.0 1.6 2000 BeOpen.com no
|
|
||||||
1.6.1 1.6 2001 CNRI yes (2)
|
|
||||||
2.1 2.0+1.6.1 2001 PSF no
|
|
||||||
2.0.1 2.0+1.6.1 2001 PSF yes
|
|
||||||
2.1.1 2.1+2.0.1 2001 PSF yes
|
|
||||||
2.2 2.1.1 2001 PSF yes
|
|
||||||
2.1.2 2.1.1 2002 PSF yes
|
|
||||||
2.1.3 2.1.2 2002 PSF yes
|
|
||||||
2.2.1 2.2 2002 PSF yes
|
|
||||||
2.2.2 2.2.1 2002 PSF yes
|
|
||||||
2.2.3 2.2.2 2003 PSF yes
|
|
||||||
2.3 2.2.2 2002-2003 PSF yes
|
|
||||||
2.3.1 2.3 2002-2003 PSF yes
|
|
||||||
2.3.2 2.3.1 2002-2003 PSF yes
|
|
||||||
2.3.3 2.3.2 2002-2003 PSF yes
|
|
||||||
2.3.4 2.3.3 2004 PSF yes
|
|
||||||
2.3.5 2.3.4 2005 PSF yes
|
|
||||||
2.4 2.3 2004 PSF yes
|
|
||||||
2.4.1 2.4 2005 PSF yes
|
|
||||||
2.4.2 2.4.1 2005 PSF yes
|
|
||||||
2.4.3 2.4.2 2006 PSF yes
|
|
||||||
2.4.4 2.4.3 2006 PSF yes
|
|
||||||
2.5 2.4 2006 PSF yes
|
|
||||||
2.5.1 2.5 2007 PSF yes
|
|
||||||
2.5.2 2.5.1 2008 PSF yes
|
|
||||||
2.5.3 2.5.2 2008 PSF yes
|
|
||||||
2.6 2.5 2008 PSF yes
|
|
||||||
2.6.1 2.6 2008 PSF yes
|
|
||||||
2.6.2 2.6.1 2009 PSF yes
|
|
||||||
2.6.3 2.6.2 2009 PSF yes
|
|
||||||
2.6.4 2.6.3 2009 PSF yes
|
|
||||||
2.6.5 2.6.4 2010 PSF yes
|
|
||||||
3.0 2.6 2008 PSF yes
|
|
||||||
3.0.1 3.0 2009 PSF yes
|
|
||||||
3.1 3.0.1 2009 PSF yes
|
|
||||||
3.1.1 3.1 2009 PSF yes
|
|
||||||
3.1.2 3.1 2010 PSF yes
|
|
||||||
3.2 3.1 2010 PSF yes
|
|
||||||
|
|
||||||
Footnotes:
|
|
||||||
|
|
||||||
(1) GPL-compatible doesn't mean that we're distributing Python under
|
|
||||||
the GPL. All Python licenses, unlike the GPL, let you distribute
|
|
||||||
a modified version without making your changes open source. The
|
|
||||||
GPL-compatible licenses make it possible to combine Python with
|
|
||||||
other software that is released under the GPL; the others don't.
|
|
||||||
|
|
||||||
(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
|
|
||||||
because its license has a choice of law clause. According to
|
|
||||||
CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
|
|
||||||
is "not incompatible" with the GPL.
|
|
||||||
|
|
||||||
Thanks to the many outside volunteers who have worked under Guido's
|
|
||||||
direction to make these releases possible.
|
|
||||||
|
|
||||||
|
|
||||||
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
|
|
||||||
===============================================================
|
|
||||||
|
|
||||||
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
|
||||||
--------------------------------------------
|
|
||||||
|
|
||||||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
|
||||||
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
|
||||||
otherwise using this software ("Python") in source or binary form and
|
|
||||||
its associated documentation.
|
|
||||||
|
|
||||||
2. Subject to the terms and conditions of this License Agreement, PSF hereby
|
|
||||||
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
|
|
||||||
analyze, test, perform and/or display publicly, prepare derivative works,
|
|
||||||
distribute, and otherwise use Python alone or in any derivative version,
|
|
||||||
provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
|
||||||
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
|
||||||
Python Software Foundation; All Rights Reserved" are retained in Python alone or
|
|
||||||
in any derivative version prepared by Licensee.
|
|
||||||
|
|
||||||
3. In the event Licensee prepares a derivative work that is based on
|
|
||||||
or incorporates Python or any part thereof, and wants to make
|
|
||||||
the derivative work available to others as provided herein, then
|
|
||||||
Licensee hereby agrees to include in any such work a brief summary of
|
|
||||||
the changes made to Python.
|
|
||||||
|
|
||||||
4. PSF is making Python available to Licensee on an "AS IS"
|
|
||||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
||||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
|
||||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
||||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
|
||||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
||||||
|
|
||||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
||||||
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
||||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
|
||||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
||||||
|
|
||||||
6. This License Agreement will automatically terminate upon a material
|
|
||||||
breach of its terms and conditions.
|
|
||||||
|
|
||||||
7. Nothing in this License Agreement shall be deemed to create any
|
|
||||||
relationship of agency, partnership, or joint venture between PSF and
|
|
||||||
Licensee. This License Agreement does not grant permission to use PSF
|
|
||||||
trademarks or trade name in a trademark sense to endorse or promote
|
|
||||||
products or services of Licensee, or any third party.
|
|
||||||
|
|
||||||
8. By copying, installing or otherwise using Python, Licensee
|
|
||||||
agrees to be bound by the terms and conditions of this License
|
|
||||||
Agreement.
|
|
||||||
|
|
||||||
|
|
||||||
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
|
|
||||||
|
|
||||||
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
|
|
||||||
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
|
|
||||||
Individual or Organization ("Licensee") accessing and otherwise using
|
|
||||||
this software in source or binary form and its associated
|
|
||||||
documentation ("the Software").
|
|
||||||
|
|
||||||
2. Subject to the terms and conditions of this BeOpen Python License
|
|
||||||
Agreement, BeOpen hereby grants Licensee a non-exclusive,
|
|
||||||
royalty-free, world-wide license to reproduce, analyze, test, perform
|
|
||||||
and/or display publicly, prepare derivative works, distribute, and
|
|
||||||
otherwise use the Software alone or in any derivative version,
|
|
||||||
provided, however, that the BeOpen Python License is retained in the
|
|
||||||
Software, alone or in any derivative version prepared by Licensee.
|
|
||||||
|
|
||||||
3. BeOpen is making the Software available to Licensee on an "AS IS"
|
|
||||||
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
||||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
|
|
||||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
||||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
|
|
||||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
||||||
|
|
||||||
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
|
||||||
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
|
|
||||||
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
|
|
||||||
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
||||||
|
|
||||||
5. This License Agreement will automatically terminate upon a material
|
|
||||||
breach of its terms and conditions.
|
|
||||||
|
|
||||||
6. This License Agreement shall be governed by and interpreted in all
|
|
||||||
respects by the law of the State of California, excluding conflict of
|
|
||||||
law provisions. Nothing in this License Agreement shall be deemed to
|
|
||||||
create any relationship of agency, partnership, or joint venture
|
|
||||||
between BeOpen and Licensee. This License Agreement does not grant
|
|
||||||
permission to use BeOpen trademarks or trade names in a trademark
|
|
||||||
sense to endorse or promote products or services of Licensee, or any
|
|
||||||
third party. As an exception, the "BeOpen Python" logos available at
|
|
||||||
http://www.pythonlabs.com/logos.html may be used according to the
|
|
||||||
permissions granted on that web page.
|
|
||||||
|
|
||||||
7. By copying, installing or otherwise using the software, Licensee
|
|
||||||
agrees to be bound by the terms and conditions of this License
|
|
||||||
Agreement.
|
|
||||||
|
|
||||||
|
|
||||||
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
|
|
||||||
---------------------------------------
|
|
||||||
|
|
||||||
1. This LICENSE AGREEMENT is between the Corporation for National
|
|
||||||
Research Initiatives, having an office at 1895 Preston White Drive,
|
|
||||||
Reston, VA 20191 ("CNRI"), and the Individual or Organization
|
|
||||||
("Licensee") accessing and otherwise using Python 1.6.1 software in
|
|
||||||
source or binary form and its associated documentation.
|
|
||||||
|
|
||||||
2. Subject to the terms and conditions of this License Agreement, CNRI
|
|
||||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
|
||||||
license to reproduce, analyze, test, perform and/or display publicly,
|
|
||||||
prepare derivative works, distribute, and otherwise use Python 1.6.1
|
|
||||||
alone or in any derivative version, provided, however, that CNRI's
|
|
||||||
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
|
|
||||||
1995-2001 Corporation for National Research Initiatives; All Rights
|
|
||||||
Reserved" are retained in Python 1.6.1 alone or in any derivative
|
|
||||||
version prepared by Licensee. Alternately, in lieu of CNRI's License
|
|
||||||
Agreement, Licensee may substitute the following text (omitting the
|
|
||||||
quotes): "Python 1.6.1 is made available subject to the terms and
|
|
||||||
conditions in CNRI's License Agreement. This Agreement together with
|
|
||||||
Python 1.6.1 may be located on the Internet using the following
|
|
||||||
unique, persistent identifier (known as a handle): 1895.22/1013. This
|
|
||||||
Agreement may also be obtained from a proxy server on the Internet
|
|
||||||
using the following URL: http://hdl.handle.net/1895.22/1013".
|
|
||||||
|
|
||||||
3. In the event Licensee prepares a derivative work that is based on
|
|
||||||
or incorporates Python 1.6.1 or any part thereof, and wants to make
|
|
||||||
the derivative work available to others as provided herein, then
|
|
||||||
Licensee hereby agrees to include in any such work a brief summary of
|
|
||||||
the changes made to Python 1.6.1.
|
|
||||||
|
|
||||||
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
|
|
||||||
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
||||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
|
|
||||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
||||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
|
|
||||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
||||||
|
|
||||||
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
||||||
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
||||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
|
|
||||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
||||||
|
|
||||||
6. This License Agreement will automatically terminate upon a material
|
|
||||||
breach of its terms and conditions.
|
|
||||||
|
|
||||||
7. This License Agreement shall be governed by the federal
|
|
||||||
intellectual property law of the United States, including without
|
|
||||||
limitation the federal copyright law, and, to the extent such
|
|
||||||
U.S. federal law does not apply, by the law of the Commonwealth of
|
|
||||||
Virginia, excluding Virginia's conflict of law provisions.
|
|
||||||
Notwithstanding the foregoing, with regard to derivative works based
|
|
||||||
on Python 1.6.1 that incorporate non-separable material that was
|
|
||||||
previously distributed under the GNU General Public License (GPL), the
|
|
||||||
law of the Commonwealth of Virginia shall govern this License
|
|
||||||
Agreement only as to issues arising under or with respect to
|
|
||||||
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
|
|
||||||
License Agreement shall be deemed to create any relationship of
|
|
||||||
agency, partnership, or joint venture between CNRI and Licensee. This
|
|
||||||
License Agreement does not grant permission to use CNRI trademarks or
|
|
||||||
trade name in a trademark sense to endorse or promote products or
|
|
||||||
services of Licensee, or any third party.
|
|
||||||
|
|
||||||
8. By clicking on the "ACCEPT" button where indicated, or by copying,
|
|
||||||
installing or otherwise using Python 1.6.1, Licensee agrees to be
|
|
||||||
bound by the terms and conditions of this License Agreement.
|
|
||||||
|
|
||||||
ACCEPT
|
|
||||||
|
|
||||||
|
|
||||||
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
|
|
||||||
--------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
|
|
||||||
The Netherlands. All rights reserved.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
|
||||||
documentation for any purpose and without fee is hereby granted,
|
|
||||||
provided that the above copyright notice appear in all copies and that
|
|
||||||
both that copyright notice and this permission notice appear in
|
|
||||||
supporting documentation, and that the name of Stichting Mathematisch
|
|
||||||
Centrum or CWI not be used in advertising or publicity pertaining to
|
|
||||||
distribution of the software without specific, written prior
|
|
||||||
permission.
|
|
||||||
|
|
||||||
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
|
||||||
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
|
||||||
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
||||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
-202
@@ -1,202 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
BSD 3-Clause License
|
|
||||||
|
|
||||||
Copyright (c) 2013-2025, Kim Davies and contributors.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are
|
|
||||||
met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
||||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
||||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
Copyright (C) 2008-2011 INADA Naoki <songofacandy@gmail.com>
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
||||||
-3
@@ -1,3 +0,0 @@
|
|||||||
This software is made available under the terms of *either* of the licenses
|
|
||||||
found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made
|
|
||||||
under the terms of *both* these licenses.
|
|
||||||
-177
@@ -1,177 +0,0 @@
|
|||||||
|
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
Copyright (c) Donald Stufft and individual contributors.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to
|
|
||||||
deal in the Software without restriction, including without limitation the
|
|
||||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
IN THE SOFTWARE.
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2010-202x The platformdirs developers
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
Copyright (c) 2006-2022 by the respective authors (see AUTHORS file).
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are
|
|
||||||
met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
||||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2017 Thomas Kluyver
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
-175
@@ -1,175 +0,0 @@
|
|||||||
|
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
Copyright (c) 2018, Tzu-ping Chung <uranusjr@gmail.com>
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
Copyright (c) 2020 Will McGugan
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 Taneli Hukkinen
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 Taneli Hukkinen
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2022 Seth Michael Larson
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2008-2020 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
Whitespace-only changes.
@@ -1,6 +1,10 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
__version__ = "26.0.1"
|
__version__ = "26.3"
|
||||||
|
|
||||||
|
# External tools should import dependencies themselves. If technically unable,
|
||||||
|
# add names here, not to pip's internal list.
|
||||||
|
_EAGER_IMPORTS: set[str] = set()
|
||||||
|
|
||||||
|
|
||||||
def main(args: list[str] | None = None) -> int:
|
def main(args: list[str] | None = None) -> int:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if sys.path[0] in ("", os.getcwd()):
|
|||||||
|
|
||||||
# If we are running from a wheel, add the wheel to sys.path
|
# If we are running from a wheel, add the wheel to sys.path
|
||||||
# This allows the usage python pip-*.whl/pip install pip-*.whl
|
# This allows the usage python pip-*.whl/pip install pip-*.whl
|
||||||
if __package__ == "":
|
if not __spec__ or __spec__.parent == "":
|
||||||
# __file__ is pip-*.whl/pip/__main__.py
|
# __file__ is pip-*.whl/pip/__main__.py
|
||||||
# first dirname call strips of '/__main__.py', second strips off '/pip'
|
# first dirname call strips of '/__main__.py', second strips off '/pip'
|
||||||
# Resulting path is the name of the wheel itself
|
# Resulting path is the name of the wheel itself
|
||||||
@@ -19,6 +19,6 @@ if __package__ == "":
|
|||||||
sys.path.insert(0, path)
|
sys.path.insert(0, path)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from pip._internal.cli.main import main as _main
|
from pip._internal.cli.main import cli as _main
|
||||||
|
|
||||||
sys.exit(_main())
|
sys.exit(_main())
|
||||||
@@ -9,7 +9,7 @@ an import statement.
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Copied from pyproject.toml
|
# Copied from pyproject.toml
|
||||||
PYTHON_REQUIRES = (3, 9)
|
PYTHON_REQUIRES = (3, 10)
|
||||||
|
|
||||||
|
|
||||||
def version_str(version): # type: ignore
|
def version_str(version): # type: ignore
|
||||||
|
|||||||
Regular → Executable
File mode changed.
@@ -1,606 +0,0 @@
|
|||||||
"""Build Environment used for isolation during sdist building"""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import logging
|
|
||||||
import os
|
|
||||||
import pathlib
|
|
||||||
import site
|
|
||||||
import sys
|
|
||||||
import textwrap
|
|
||||||
from collections import OrderedDict
|
|
||||||
from collections.abc import Iterable, Sequence
|
|
||||||
from contextlib import AbstractContextManager as ContextManager
|
|
||||||
from contextlib import nullcontext
|
|
||||||
from io import StringIO
|
|
||||||
from types import TracebackType
|
|
||||||
from typing import TYPE_CHECKING, Protocol, TypedDict
|
|
||||||
|
|
||||||
from pip._vendor.packaging.version import Version
|
|
||||||
|
|
||||||
from pip import __file__ as pip_location
|
|
||||||
from pip._internal.cli.spinners import open_rich_spinner, open_spinner
|
|
||||||
from pip._internal.exceptions import (
|
|
||||||
BuildDependencyInstallError,
|
|
||||||
DiagnosticPipError,
|
|
||||||
InstallWheelBuildError,
|
|
||||||
PipError,
|
|
||||||
)
|
|
||||||
from pip._internal.locations import get_platlib, get_purelib, get_scheme
|
|
||||||
from pip._internal.metadata import get_default_environment, get_environment
|
|
||||||
from pip._internal.utils.deprecation import deprecated
|
|
||||||
from pip._internal.utils.logging import VERBOSE, capture_logging
|
|
||||||
from pip._internal.utils.packaging import get_requirement
|
|
||||||
from pip._internal.utils.subprocess import call_subprocess
|
|
||||||
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from pip._internal.cache import WheelCache
|
|
||||||
from pip._internal.index.package_finder import PackageFinder
|
|
||||||
from pip._internal.operations.build.build_tracker import BuildTracker
|
|
||||||
from pip._internal.req.req_install import InstallRequirement
|
|
||||||
from pip._internal.resolution.base import BaseResolver
|
|
||||||
|
|
||||||
class ExtraEnviron(TypedDict, total=False):
|
|
||||||
extra_environ: dict[str, str]
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def _dedup(a: str, b: str) -> tuple[str] | tuple[str, str]:
|
|
||||||
return (a, b) if a != b else (a,)
|
|
||||||
|
|
||||||
|
|
||||||
class _Prefix:
|
|
||||||
def __init__(self, path: str) -> None:
|
|
||||||
self.path = path
|
|
||||||
self.setup = False
|
|
||||||
scheme = get_scheme("", prefix=path)
|
|
||||||
self.bin_dir = scheme.scripts
|
|
||||||
self.lib_dirs = _dedup(scheme.purelib, scheme.platlib)
|
|
||||||
|
|
||||||
|
|
||||||
def get_runnable_pip() -> str:
|
|
||||||
"""Get a file to pass to a Python executable, to run the currently-running pip.
|
|
||||||
|
|
||||||
This is used to run a pip subprocess, for installing requirements into the build
|
|
||||||
environment.
|
|
||||||
"""
|
|
||||||
source = pathlib.Path(pip_location).resolve().parent
|
|
||||||
|
|
||||||
if not source.is_dir():
|
|
||||||
# This would happen if someone is using pip from inside a zip file. In that
|
|
||||||
# case, we can use that directly.
|
|
||||||
return str(source)
|
|
||||||
|
|
||||||
return os.fsdecode(source / "__pip-runner__.py")
|
|
||||||
|
|
||||||
|
|
||||||
def _get_system_sitepackages() -> set[str]:
|
|
||||||
"""Get system site packages
|
|
||||||
|
|
||||||
Usually from site.getsitepackages,
|
|
||||||
but fallback on `get_purelib()/get_platlib()` if unavailable
|
|
||||||
(e.g. in a virtualenv created by virtualenv<20)
|
|
||||||
|
|
||||||
Returns normalized set of strings.
|
|
||||||
"""
|
|
||||||
if hasattr(site, "getsitepackages"):
|
|
||||||
system_sites = site.getsitepackages()
|
|
||||||
else:
|
|
||||||
# virtualenv < 20 overwrites site.py without getsitepackages
|
|
||||||
# fallback on get_purelib/get_platlib.
|
|
||||||
# this is known to miss things, but shouldn't in the cases
|
|
||||||
# where getsitepackages() has been removed (inside a virtualenv)
|
|
||||||
system_sites = [get_purelib(), get_platlib()]
|
|
||||||
return {os.path.normcase(path) for path in system_sites}
|
|
||||||
|
|
||||||
|
|
||||||
class BuildEnvironmentInstaller(Protocol):
|
|
||||||
"""
|
|
||||||
Interface for installing build dependencies into an isolated build
|
|
||||||
environment.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def install(
|
|
||||||
self,
|
|
||||||
requirements: Iterable[str],
|
|
||||||
prefix: _Prefix,
|
|
||||||
*,
|
|
||||||
kind: str,
|
|
||||||
for_req: InstallRequirement | None,
|
|
||||||
) -> None: ...
|
|
||||||
|
|
||||||
|
|
||||||
class SubprocessBuildEnvironmentInstaller:
|
|
||||||
"""
|
|
||||||
Install build dependencies by calling pip in a subprocess.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
finder: PackageFinder,
|
|
||||||
build_constraints: list[str] | None = None,
|
|
||||||
build_constraint_feature_enabled: bool = False,
|
|
||||||
) -> None:
|
|
||||||
self.finder = finder
|
|
||||||
self._build_constraints = build_constraints or []
|
|
||||||
self._build_constraint_feature_enabled = build_constraint_feature_enabled
|
|
||||||
|
|
||||||
def _deprecation_constraint_check(self) -> None:
|
|
||||||
"""
|
|
||||||
Check for deprecation warning: PIP_CONSTRAINT affecting build environments.
|
|
||||||
|
|
||||||
This warns when build-constraint feature is NOT enabled and PIP_CONSTRAINT
|
|
||||||
is not empty.
|
|
||||||
"""
|
|
||||||
if self._build_constraint_feature_enabled or self._build_constraints:
|
|
||||||
return
|
|
||||||
|
|
||||||
pip_constraint = os.environ.get("PIP_CONSTRAINT")
|
|
||||||
if not pip_constraint or not pip_constraint.strip():
|
|
||||||
return
|
|
||||||
|
|
||||||
deprecated(
|
|
||||||
reason=(
|
|
||||||
"Setting PIP_CONSTRAINT will not affect "
|
|
||||||
"build constraints in the future,"
|
|
||||||
),
|
|
||||||
replacement=(
|
|
||||||
"to specify build constraints using --build-constraint or "
|
|
||||||
"PIP_BUILD_CONSTRAINT. To disable this warning without "
|
|
||||||
"any build constraints set --use-feature=build-constraint or "
|
|
||||||
'PIP_USE_FEATURE="build-constraint"'
|
|
||||||
),
|
|
||||||
gone_in="26.2",
|
|
||||||
issue=None,
|
|
||||||
)
|
|
||||||
|
|
||||||
def install(
|
|
||||||
self,
|
|
||||||
requirements: Iterable[str],
|
|
||||||
prefix: _Prefix,
|
|
||||||
*,
|
|
||||||
kind: str,
|
|
||||||
for_req: InstallRequirement | None,
|
|
||||||
) -> None:
|
|
||||||
self._deprecation_constraint_check()
|
|
||||||
|
|
||||||
finder = self.finder
|
|
||||||
args: list[str] = [
|
|
||||||
sys.executable,
|
|
||||||
get_runnable_pip(),
|
|
||||||
"install",
|
|
||||||
"--ignore-installed",
|
|
||||||
"--no-user",
|
|
||||||
"--prefix",
|
|
||||||
prefix.path,
|
|
||||||
"--no-warn-script-location",
|
|
||||||
"--disable-pip-version-check",
|
|
||||||
# As the build environment is ephemeral, it's wasteful to
|
|
||||||
# pre-compile everything, especially as not every Python
|
|
||||||
# module will be used/compiled in most cases.
|
|
||||||
"--no-compile",
|
|
||||||
# The prefix specified two lines above, thus
|
|
||||||
# target from config file or env var should be ignored
|
|
||||||
"--target",
|
|
||||||
"",
|
|
||||||
]
|
|
||||||
if logger.getEffectiveLevel() <= logging.DEBUG:
|
|
||||||
args.append("-vv")
|
|
||||||
elif logger.getEffectiveLevel() <= VERBOSE:
|
|
||||||
args.append("-v")
|
|
||||||
for format_control in ("no_binary", "only_binary"):
|
|
||||||
formats = getattr(finder.format_control, format_control)
|
|
||||||
args.extend(
|
|
||||||
(
|
|
||||||
"--" + format_control.replace("_", "-"),
|
|
||||||
",".join(sorted(formats or {":none:"})),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if finder.release_control is not None:
|
|
||||||
# Use ordered args to preserve the user's original command-line order
|
|
||||||
# This is important because later flags can override earlier ones
|
|
||||||
for attr_name, value in finder.release_control.get_ordered_args():
|
|
||||||
args.extend(("--" + attr_name.replace("_", "-"), value))
|
|
||||||
|
|
||||||
index_urls = finder.index_urls
|
|
||||||
if index_urls:
|
|
||||||
args.extend(["-i", index_urls[0]])
|
|
||||||
for extra_index in index_urls[1:]:
|
|
||||||
args.extend(["--extra-index-url", extra_index])
|
|
||||||
else:
|
|
||||||
args.append("--no-index")
|
|
||||||
for link in finder.find_links:
|
|
||||||
args.extend(["--find-links", link])
|
|
||||||
|
|
||||||
if finder.proxy:
|
|
||||||
args.extend(["--proxy", finder.proxy])
|
|
||||||
for host in finder.trusted_hosts:
|
|
||||||
args.extend(["--trusted-host", host])
|
|
||||||
if finder.custom_cert:
|
|
||||||
args.extend(["--cert", finder.custom_cert])
|
|
||||||
if finder.client_cert:
|
|
||||||
args.extend(["--client-cert", finder.client_cert])
|
|
||||||
if finder.prefer_binary:
|
|
||||||
args.append("--prefer-binary")
|
|
||||||
|
|
||||||
# Handle build constraints
|
|
||||||
if self._build_constraint_feature_enabled:
|
|
||||||
args.extend(["--use-feature", "build-constraint"])
|
|
||||||
|
|
||||||
if self._build_constraints:
|
|
||||||
# Build constraints must be passed as both constraints
|
|
||||||
# and build constraints, so that nested builds receive
|
|
||||||
# build constraints
|
|
||||||
for constraint_file in self._build_constraints:
|
|
||||||
args.extend(["--constraint", constraint_file])
|
|
||||||
args.extend(["--build-constraint", constraint_file])
|
|
||||||
|
|
||||||
extra_environ: ExtraEnviron = {}
|
|
||||||
if self._build_constraint_feature_enabled and not self._build_constraints:
|
|
||||||
# If there are no build constraints but the build constraints
|
|
||||||
# feature is enabled then we must ignore regular constraints
|
|
||||||
# in the isolated build environment
|
|
||||||
extra_environ = {"extra_environ": {"_PIP_IN_BUILD_IGNORE_CONSTRAINTS": "1"}}
|
|
||||||
|
|
||||||
if finder.uploaded_prior_to:
|
|
||||||
args.extend(["--uploaded-prior-to", finder.uploaded_prior_to.isoformat()])
|
|
||||||
args.append("--")
|
|
||||||
args.extend(requirements)
|
|
||||||
|
|
||||||
identify_requirement = (
|
|
||||||
f" for {for_req.name}" if for_req and for_req.name else ""
|
|
||||||
)
|
|
||||||
with open_spinner(f"Installing {kind}") as spinner:
|
|
||||||
call_subprocess(
|
|
||||||
args,
|
|
||||||
command_desc=f"installing {kind}{identify_requirement}",
|
|
||||||
spinner=spinner,
|
|
||||||
**extra_environ,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class InprocessBuildEnvironmentInstaller:
|
|
||||||
"""
|
|
||||||
Build dependency installer that runs in the same pip process.
|
|
||||||
|
|
||||||
This contains a stripped down version of the install command with
|
|
||||||
only the logic necessary for installing build dependencies. The
|
|
||||||
finder, session, build tracker, and wheel cache are reused, but new
|
|
||||||
instances of everything else are created as needed.
|
|
||||||
|
|
||||||
Options are inherited from the parent install command unless
|
|
||||||
they don't make sense for build dependencies (in which case, they
|
|
||||||
are hard-coded, see comments below).
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
finder: PackageFinder,
|
|
||||||
build_tracker: BuildTracker,
|
|
||||||
wheel_cache: WheelCache,
|
|
||||||
build_constraints: Sequence[InstallRequirement] = (),
|
|
||||||
verbosity: int = 0,
|
|
||||||
) -> None:
|
|
||||||
from pip._internal.operations.prepare import RequirementPreparer
|
|
||||||
|
|
||||||
self._finder = finder
|
|
||||||
self._build_constraints = build_constraints
|
|
||||||
self._wheel_cache = wheel_cache
|
|
||||||
self._level = 0
|
|
||||||
|
|
||||||
build_dir = TempDirectory(kind="build-env-install", globally_managed=True)
|
|
||||||
self._preparer = RequirementPreparer(
|
|
||||||
build_isolation_installer=self,
|
|
||||||
# Inherited options or state.
|
|
||||||
finder=finder,
|
|
||||||
session=finder._link_collector.session,
|
|
||||||
build_dir=build_dir.path,
|
|
||||||
build_tracker=build_tracker,
|
|
||||||
verbosity=verbosity,
|
|
||||||
# This is irrelevant as it only applies to editable requirements.
|
|
||||||
src_dir="",
|
|
||||||
# Hard-coded options (that should NOT be inherited).
|
|
||||||
download_dir=None,
|
|
||||||
build_isolation=True,
|
|
||||||
check_build_deps=False,
|
|
||||||
progress_bar="off",
|
|
||||||
# TODO: hash-checking should be extended to build deps, but that is
|
|
||||||
# deferred for later as it'd be a breaking change.
|
|
||||||
require_hashes=False,
|
|
||||||
use_user_site=False,
|
|
||||||
lazy_wheel=False,
|
|
||||||
legacy_resolver=False,
|
|
||||||
)
|
|
||||||
|
|
||||||
def install(
|
|
||||||
self,
|
|
||||||
requirements: Iterable[str],
|
|
||||||
prefix: _Prefix,
|
|
||||||
*,
|
|
||||||
kind: str,
|
|
||||||
for_req: InstallRequirement | None,
|
|
||||||
) -> None:
|
|
||||||
"""Install entrypoint. Manages output capturing and error handling."""
|
|
||||||
capture_logs = not logger.isEnabledFor(VERBOSE) and self._level == 0
|
|
||||||
if capture_logs:
|
|
||||||
# Hide the logs from the installation of build dependencies.
|
|
||||||
# They will be shown only if an error occurs.
|
|
||||||
capture_ctx: ContextManager[StringIO] = capture_logging()
|
|
||||||
spinner: ContextManager[None] = open_rich_spinner(f"Installing {kind}")
|
|
||||||
else:
|
|
||||||
# Otherwise, pass-through all logs (with a header).
|
|
||||||
capture_ctx, spinner = nullcontext(StringIO()), nullcontext()
|
|
||||||
logger.info("Installing %s ...", kind)
|
|
||||||
|
|
||||||
try:
|
|
||||||
self._level += 1
|
|
||||||
with spinner, capture_ctx as stream:
|
|
||||||
self._install_impl(requirements, prefix)
|
|
||||||
|
|
||||||
except DiagnosticPipError as exc:
|
|
||||||
# Format similar to a nested subprocess error, where the
|
|
||||||
# causing error is shown first, followed by the build error.
|
|
||||||
logger.info(textwrap.dedent(stream.getvalue()))
|
|
||||||
logger.error("%s", exc, extra={"rich": True})
|
|
||||||
logger.info("")
|
|
||||||
raise BuildDependencyInstallError(
|
|
||||||
for_req, requirements, cause=exc, log_lines=None
|
|
||||||
)
|
|
||||||
|
|
||||||
except Exception as exc:
|
|
||||||
logs: list[str] | None = textwrap.dedent(stream.getvalue()).splitlines()
|
|
||||||
if not capture_logs:
|
|
||||||
# If logs aren't being captured, then display the error inline
|
|
||||||
# with the rest of the logs.
|
|
||||||
logs = None
|
|
||||||
if isinstance(exc, PipError):
|
|
||||||
logger.error("%s", exc)
|
|
||||||
else:
|
|
||||||
logger.exception("pip crashed unexpectedly")
|
|
||||||
raise BuildDependencyInstallError(
|
|
||||||
for_req, requirements, cause=exc, log_lines=logs
|
|
||||||
)
|
|
||||||
|
|
||||||
finally:
|
|
||||||
self._level -= 1
|
|
||||||
|
|
||||||
def _install_impl(self, requirements: Iterable[str], prefix: _Prefix) -> None:
|
|
||||||
"""Core build dependency install logic."""
|
|
||||||
from pip._internal.commands.install import installed_packages_summary
|
|
||||||
from pip._internal.req import install_given_reqs
|
|
||||||
from pip._internal.req.constructors import install_req_from_line
|
|
||||||
from pip._internal.wheel_builder import build
|
|
||||||
|
|
||||||
ireqs = [install_req_from_line(req, user_supplied=True) for req in requirements]
|
|
||||||
ireqs.extend(self._build_constraints)
|
|
||||||
|
|
||||||
resolver = self._make_resolver()
|
|
||||||
resolved_set = resolver.resolve(ireqs, check_supported_wheels=True)
|
|
||||||
self._preparer.prepare_linked_requirements_more(
|
|
||||||
resolved_set.requirements.values()
|
|
||||||
)
|
|
||||||
|
|
||||||
reqs_to_build = [
|
|
||||||
r for r in resolved_set.requirements_to_install if not r.is_wheel
|
|
||||||
]
|
|
||||||
_, build_failures = build(reqs_to_build, self._wheel_cache, verify=True)
|
|
||||||
if build_failures:
|
|
||||||
raise InstallWheelBuildError(build_failures)
|
|
||||||
|
|
||||||
installed = install_given_reqs(
|
|
||||||
resolver.get_installation_order(resolved_set),
|
|
||||||
prefix=prefix.path,
|
|
||||||
# Hard-coded options (that should NOT be inherited).
|
|
||||||
root=None,
|
|
||||||
home=None,
|
|
||||||
warn_script_location=False,
|
|
||||||
use_user_site=False,
|
|
||||||
# As the build environment is ephemeral, it's wasteful to
|
|
||||||
# pre-compile everything since not all modules will be used.
|
|
||||||
pycompile=False,
|
|
||||||
progress_bar="off",
|
|
||||||
)
|
|
||||||
|
|
||||||
env = get_environment(list(prefix.lib_dirs))
|
|
||||||
if summary := installed_packages_summary(installed, env):
|
|
||||||
logger.info(summary)
|
|
||||||
|
|
||||||
def _make_resolver(self) -> BaseResolver:
|
|
||||||
"""Create a new resolver for one time use."""
|
|
||||||
# Legacy installer never used the legacy resolver so create a
|
|
||||||
# resolvelib resolver directly. Yuck.
|
|
||||||
from pip._internal.req.constructors import install_req_from_req_string
|
|
||||||
from pip._internal.resolution.resolvelib.resolver import Resolver
|
|
||||||
|
|
||||||
return Resolver(
|
|
||||||
make_install_req=install_req_from_req_string,
|
|
||||||
# Inherited state.
|
|
||||||
preparer=self._preparer,
|
|
||||||
finder=self._finder,
|
|
||||||
wheel_cache=self._wheel_cache,
|
|
||||||
# Hard-coded options (that should NOT be inherited).
|
|
||||||
ignore_requires_python=False,
|
|
||||||
use_user_site=False,
|
|
||||||
ignore_dependencies=False,
|
|
||||||
ignore_installed=True,
|
|
||||||
force_reinstall=False,
|
|
||||||
upgrade_strategy="to-satisfy-only",
|
|
||||||
py_version_info=None,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class BuildEnvironment:
|
|
||||||
"""Creates and manages an isolated environment to install build deps"""
|
|
||||||
|
|
||||||
def __init__(self, installer: BuildEnvironmentInstaller) -> None:
|
|
||||||
self.installer = installer
|
|
||||||
temp_dir = TempDirectory(kind=tempdir_kinds.BUILD_ENV, globally_managed=True)
|
|
||||||
|
|
||||||
self._prefixes = OrderedDict(
|
|
||||||
(name, _Prefix(os.path.join(temp_dir.path, name)))
|
|
||||||
for name in ("normal", "overlay")
|
|
||||||
)
|
|
||||||
|
|
||||||
self._bin_dirs: list[str] = []
|
|
||||||
self._lib_dirs: list[str] = []
|
|
||||||
for prefix in reversed(list(self._prefixes.values())):
|
|
||||||
self._bin_dirs.append(prefix.bin_dir)
|
|
||||||
self._lib_dirs.extend(prefix.lib_dirs)
|
|
||||||
|
|
||||||
# Customize site to:
|
|
||||||
# - ensure .pth files are honored
|
|
||||||
# - prevent access to system site packages
|
|
||||||
system_sites = _get_system_sitepackages()
|
|
||||||
|
|
||||||
self._site_dir = os.path.join(temp_dir.path, "site")
|
|
||||||
if not os.path.exists(self._site_dir):
|
|
||||||
os.mkdir(self._site_dir)
|
|
||||||
with open(
|
|
||||||
os.path.join(self._site_dir, "sitecustomize.py"), "w", encoding="utf-8"
|
|
||||||
) as fp:
|
|
||||||
fp.write(
|
|
||||||
textwrap.dedent(
|
|
||||||
"""
|
|
||||||
import os, site, sys
|
|
||||||
|
|
||||||
# First, drop system-sites related paths.
|
|
||||||
original_sys_path = sys.path[:]
|
|
||||||
known_paths = set()
|
|
||||||
for path in {system_sites!r}:
|
|
||||||
site.addsitedir(path, known_paths=known_paths)
|
|
||||||
system_paths = set(
|
|
||||||
os.path.normcase(path)
|
|
||||||
for path in sys.path[len(original_sys_path):]
|
|
||||||
)
|
|
||||||
original_sys_path = [
|
|
||||||
path for path in original_sys_path
|
|
||||||
if os.path.normcase(path) not in system_paths
|
|
||||||
]
|
|
||||||
sys.path = original_sys_path
|
|
||||||
|
|
||||||
# Second, add lib directories.
|
|
||||||
# ensuring .pth file are processed.
|
|
||||||
for path in {lib_dirs!r}:
|
|
||||||
assert not path in sys.path
|
|
||||||
site.addsitedir(path)
|
|
||||||
"""
|
|
||||||
).format(system_sites=system_sites, lib_dirs=self._lib_dirs)
|
|
||||||
)
|
|
||||||
|
|
||||||
def __enter__(self) -> None:
|
|
||||||
self._save_env = {
|
|
||||||
name: os.environ.get(name, None)
|
|
||||||
for name in ("PATH", "PYTHONNOUSERSITE", "PYTHONPATH")
|
|
||||||
}
|
|
||||||
|
|
||||||
path = self._bin_dirs[:]
|
|
||||||
old_path = self._save_env["PATH"]
|
|
||||||
if old_path:
|
|
||||||
path.extend(old_path.split(os.pathsep))
|
|
||||||
|
|
||||||
pythonpath = [self._site_dir]
|
|
||||||
|
|
||||||
os.environ.update(
|
|
||||||
{
|
|
||||||
"PATH": os.pathsep.join(path),
|
|
||||||
"PYTHONNOUSERSITE": "1",
|
|
||||||
"PYTHONPATH": os.pathsep.join(pythonpath),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
def __exit__(
|
|
||||||
self,
|
|
||||||
exc_type: type[BaseException] | None,
|
|
||||||
exc_val: BaseException | None,
|
|
||||||
exc_tb: TracebackType | None,
|
|
||||||
) -> None:
|
|
||||||
for varname, old_value in self._save_env.items():
|
|
||||||
if old_value is None:
|
|
||||||
os.environ.pop(varname, None)
|
|
||||||
else:
|
|
||||||
os.environ[varname] = old_value
|
|
||||||
|
|
||||||
def check_requirements(
|
|
||||||
self, reqs: Iterable[str]
|
|
||||||
) -> tuple[set[tuple[str, str]], set[str]]:
|
|
||||||
"""Return 2 sets:
|
|
||||||
- conflicting requirements: set of (installed, wanted) reqs tuples
|
|
||||||
- missing requirements: set of reqs
|
|
||||||
"""
|
|
||||||
missing = set()
|
|
||||||
conflicting = set()
|
|
||||||
if reqs:
|
|
||||||
env = (
|
|
||||||
get_environment(self._lib_dirs)
|
|
||||||
if hasattr(self, "_lib_dirs")
|
|
||||||
else get_default_environment()
|
|
||||||
)
|
|
||||||
for req_str in reqs:
|
|
||||||
req = get_requirement(req_str)
|
|
||||||
# We're explicitly evaluating with an empty extra value, since build
|
|
||||||
# environments are not provided any mechanism to select specific extras.
|
|
||||||
if req.marker is not None and not req.marker.evaluate({"extra": ""}):
|
|
||||||
continue
|
|
||||||
dist = env.get_distribution(req.name)
|
|
||||||
if not dist:
|
|
||||||
missing.add(req_str)
|
|
||||||
continue
|
|
||||||
if isinstance(dist.version, Version):
|
|
||||||
installed_req_str = f"{req.name}=={dist.version}"
|
|
||||||
else:
|
|
||||||
installed_req_str = f"{req.name}==={dist.version}"
|
|
||||||
if not req.specifier.contains(dist.version, prereleases=True):
|
|
||||||
conflicting.add((installed_req_str, req_str))
|
|
||||||
# FIXME: Consider direct URL?
|
|
||||||
return conflicting, missing
|
|
||||||
|
|
||||||
def install_requirements(
|
|
||||||
self,
|
|
||||||
requirements: Iterable[str],
|
|
||||||
prefix_as_string: str,
|
|
||||||
*,
|
|
||||||
kind: str,
|
|
||||||
for_req: InstallRequirement | None = None,
|
|
||||||
) -> None:
|
|
||||||
prefix = self._prefixes[prefix_as_string]
|
|
||||||
assert not prefix.setup
|
|
||||||
prefix.setup = True
|
|
||||||
if not requirements:
|
|
||||||
return
|
|
||||||
self.installer.install(requirements, prefix, kind=kind, for_req=for_req)
|
|
||||||
|
|
||||||
|
|
||||||
class NoOpBuildEnvironment(BuildEnvironment):
|
|
||||||
"""A no-op drop-in replacement for BuildEnvironment"""
|
|
||||||
|
|
||||||
def __init__(self) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def __enter__(self) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def __exit__(
|
|
||||||
self,
|
|
||||||
exc_type: type[BaseException] | None,
|
|
||||||
exc_val: BaseException | None,
|
|
||||||
exc_tb: TracebackType | None,
|
|
||||||
) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def cleanup(self) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def install_requirements(
|
|
||||||
self,
|
|
||||||
requirements: Iterable[str],
|
|
||||||
prefix_as_string: str,
|
|
||||||
*,
|
|
||||||
kind: str,
|
|
||||||
for_req: InstallRequirement | None = None,
|
|
||||||
) -> None:
|
|
||||||
raise NotImplementedError()
|
|
||||||
@@ -16,7 +16,7 @@ from pip._internal.exceptions import InvalidWheelFilename
|
|||||||
from pip._internal.models.direct_url import DirectUrl
|
from pip._internal.models.direct_url import DirectUrl
|
||||||
from pip._internal.models.link import Link
|
from pip._internal.models.link import Link
|
||||||
from pip._internal.models.wheel import Wheel
|
from pip._internal.models.wheel import Wheel
|
||||||
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
|
from pip._internal.utils.temp_dir import TempDirectory, TempDirectoryKind
|
||||||
from pip._internal.utils.urls import path_to_url
|
from pip._internal.utils.urls import path_to_url
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -134,10 +134,13 @@ class SimpleWheelCache(Cache):
|
|||||||
) -> Link:
|
) -> Link:
|
||||||
candidates = []
|
candidates = []
|
||||||
|
|
||||||
|
if link.is_existing_dir():
|
||||||
|
return link
|
||||||
if not package_name:
|
if not package_name:
|
||||||
return link
|
return link
|
||||||
|
|
||||||
canonical_package_name = canonicalize_name(package_name)
|
canonical_package_name = canonicalize_name(package_name)
|
||||||
|
supported_tags_set = set(supported_tags)
|
||||||
for wheel_name, wheel_dir in self._get_candidates(link, canonical_package_name):
|
for wheel_name, wheel_dir in self._get_candidates(link, canonical_package_name):
|
||||||
try:
|
try:
|
||||||
wheel = Wheel(wheel_name)
|
wheel = Wheel(wheel_name)
|
||||||
@@ -152,7 +155,7 @@ class SimpleWheelCache(Cache):
|
|||||||
package_name,
|
package_name,
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
if not wheel.supported(supported_tags):
|
if not wheel.supported(supported_tags_set):
|
||||||
# Built for a different python/arch/etc
|
# Built for a different python/arch/etc
|
||||||
continue
|
continue
|
||||||
candidates.append(
|
candidates.append(
|
||||||
@@ -175,7 +178,7 @@ class EphemWheelCache(SimpleWheelCache):
|
|||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self._temp_dir = TempDirectory(
|
self._temp_dir = TempDirectory(
|
||||||
kind=tempdir_kinds.EPHEM_WHEEL_CACHE,
|
kind=TempDirectoryKind.EPHEM_WHEEL_CACHE,
|
||||||
globally_managed=True,
|
globally_managed=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -279,13 +282,16 @@ class WheelCache(Cache):
|
|||||||
else:
|
else:
|
||||||
# TODO: use DirectUrl.equivalent when
|
# TODO: use DirectUrl.equivalent when
|
||||||
# https://github.com/pypa/pip/pull/10564 is merged.
|
# https://github.com/pypa/pip/pull/10564 is merged.
|
||||||
if origin.url != download_info.url:
|
# origin.url is already stripped because it came from the
|
||||||
|
# serialized origin.json file.
|
||||||
|
download_url = download_info.to_dict_compat()["url"]
|
||||||
|
if origin.url != download_url:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Origin URL %s in cache entry %s does not match download URL "
|
"Origin URL %s in cache entry %s does not match download URL "
|
||||||
"%s. This is likely a pip bug or a cache corruption issue. "
|
"%s. This is likely a pip bug or a cache corruption issue. "
|
||||||
"Will overwrite it with the new value.",
|
"Will overwrite it with the new value.",
|
||||||
origin.url,
|
origin.url,
|
||||||
cache_dir,
|
cache_dir,
|
||||||
download_info.url,
|
download_url,
|
||||||
)
|
)
|
||||||
origin_path.write_text(download_info.to_json(), encoding="utf-8")
|
origin_path.write_text(download_info.to_json(), encoding="utf-8")
|
||||||
@@ -7,11 +7,9 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from pip._internal.cli.main_parser import create_main_parser
|
from pip._internal.cli.main_parser import create_main_parser
|
||||||
from pip._internal.commands import commands_dict, create_command
|
from pip._internal.commands import commands_dict, create_command
|
||||||
from pip._internal.metadata import get_default_environment
|
|
||||||
|
|
||||||
|
|
||||||
def autocomplete() -> None:
|
def autocomplete() -> None:
|
||||||
@@ -51,6 +49,10 @@ def autocomplete() -> None:
|
|||||||
"uninstall",
|
"uninstall",
|
||||||
]
|
]
|
||||||
if should_list_installed:
|
if should_list_installed:
|
||||||
|
# NOTE: this import is deferred until absolutely necessary as it's slow,
|
||||||
|
# and it's important that autocompletion is fast.
|
||||||
|
from pip._internal.metadata import get_default_environment
|
||||||
|
|
||||||
env = get_default_environment()
|
env = get_default_environment()
|
||||||
lc = current.lower()
|
lc = current.lower()
|
||||||
installed = [
|
installed = [
|
||||||
@@ -130,26 +132,33 @@ def autocomplete() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def get_path_completion_type(
|
def get_path_completion_type(
|
||||||
cwords: list[str], cword: int, opts: Iterable[Any]
|
cwords: list[str], cword: int, opts: Iterable[optparse.Option]
|
||||||
) -> str | None:
|
) -> str | None:
|
||||||
"""Get the type of path completion (``file``, ``dir``, ``path`` or None)
|
"""Get the type of path completion (``file``, ``dir``, ``path`` or None)
|
||||||
|
|
||||||
:param cwords: same as the environmental variable ``COMP_WORDS``
|
:param cwords: Words from ``COMP_WORDS``, excluding the executable
|
||||||
:param cword: same as the environmental variable ``COMP_CWORD``
|
:param cword: Index from ``COMP_CWORD``, including the executable
|
||||||
:param opts: The available options to check
|
:param opts: The available options to check
|
||||||
:return: path completion type (``file``, ``dir``, ``path`` or None)
|
:return: path completion type (``file``, ``dir``, ``path`` or None)
|
||||||
"""
|
"""
|
||||||
if cword < 2 or not cwords[cword - 2].startswith("-"):
|
if cword < 2:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
# cwords omits the executable, so the previous word is at cword - 2.
|
||||||
|
previous_option = cwords[cword - 2].split("=", 1)[0]
|
||||||
|
if not previous_option.startswith("-"):
|
||||||
|
return None
|
||||||
|
|
||||||
for opt in opts:
|
for opt in opts:
|
||||||
if opt.help == optparse.SUPPRESS_HELP:
|
if opt.help == optparse.SUPPRESS_HELP or opt.metavar is None:
|
||||||
continue
|
continue
|
||||||
for o in str(opt).split("/"):
|
if previous_option not in opt._long_opts + opt._short_opts:
|
||||||
if cwords[cword - 2].split("=")[0] == o:
|
continue
|
||||||
if not opt.metavar or any(
|
|
||||||
x in ("path", "file", "dir") for x in opt.metavar.split("/")
|
# Metavars such as 'path/url' include a local path alternative.
|
||||||
):
|
if any(part in ("path", "file", "dir") for part in opt.metavar.split("/")):
|
||||||
return opt.metavar
|
return opt.metavar
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,15 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
from collections.abc import Callable, Iterator
|
||||||
from optparse import Values
|
from optparse import Values
|
||||||
from typing import Callable
|
|
||||||
|
|
||||||
from pip._vendor.rich import reconfigure
|
from pip._vendor.rich import reconfigure
|
||||||
from pip._vendor.rich import traceback as rich_traceback
|
from pip._vendor.rich import traceback as rich_traceback
|
||||||
@@ -18,6 +19,7 @@ from pip._internal.cli import cmdoptions
|
|||||||
from pip._internal.cli.command_context import CommandContextMixIn
|
from pip._internal.cli.command_context import CommandContextMixIn
|
||||||
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
||||||
from pip._internal.cli.status_codes import (
|
from pip._internal.cli.status_codes import (
|
||||||
|
BROKEN_STDOUT,
|
||||||
ERROR,
|
ERROR,
|
||||||
PREVIOUS_BUILD_DIR_ERROR,
|
PREVIOUS_BUILD_DIR_ERROR,
|
||||||
UNKNOWN_ERROR,
|
UNKNOWN_ERROR,
|
||||||
@@ -50,6 +52,7 @@ class Command(CommandContextMixIn):
|
|||||||
def __init__(self, name: str, summary: str, isolated: bool = False) -> None:
|
def __init__(self, name: str, summary: str, isolated: bool = False) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
self._cli = False
|
||||||
self.name = name
|
self.name = name
|
||||||
self.summary = summary
|
self.summary = summary
|
||||||
self.parser = ConfigOptionParser(
|
self.parser = ConfigOptionParser(
|
||||||
@@ -80,7 +83,8 @@ class Command(CommandContextMixIn):
|
|||||||
def add_options(self) -> None:
|
def add_options(self) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def handle_pip_version_check(self, options: Values) -> None:
|
@contextlib.contextmanager
|
||||||
|
def pip_version_check(self, options: Values, args: list[str]) -> Iterator[None]:
|
||||||
"""
|
"""
|
||||||
This is a no-op so that commands by default do not do the pip version
|
This is a no-op so that commands by default do not do the pip version
|
||||||
check.
|
check.
|
||||||
@@ -88,16 +92,15 @@ class Command(CommandContextMixIn):
|
|||||||
# Make sure we do the pip version check if the index_group options
|
# Make sure we do the pip version check if the index_group options
|
||||||
# are present.
|
# are present.
|
||||||
assert not hasattr(options, "no_index")
|
assert not hasattr(options, "no_index")
|
||||||
|
yield
|
||||||
|
|
||||||
def run(self, options: Values, args: list[str]) -> int:
|
def run(self, options: Values, args: list[str]) -> int:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def _run_wrapper(self, level_number: int, options: Values, args: list[str]) -> int:
|
def _run_wrapper(self, level_number: int, options: Values, args: list[str]) -> int:
|
||||||
def _inner_run() -> int:
|
def _inner_run() -> int:
|
||||||
try:
|
with self.pip_version_check(options, args):
|
||||||
return self.run(options, args)
|
return self.run(options, args)
|
||||||
finally:
|
|
||||||
self.handle_pip_version_check(options)
|
|
||||||
|
|
||||||
if options.debug_mode:
|
if options.debug_mode:
|
||||||
rich_traceback.install(show_locals=True)
|
rich_traceback.install(show_locals=True)
|
||||||
@@ -132,13 +135,28 @@ class Command(CommandContextMixIn):
|
|||||||
|
|
||||||
return ERROR
|
return ERROR
|
||||||
except BrokenStdoutLoggingError:
|
except BrokenStdoutLoggingError:
|
||||||
# Bypass our logger and write any remaining messages to
|
# stdout is broken; write to stderr directly. Use os.write, not
|
||||||
# stderr because stdout no longer works.
|
# sys.stderr.write, so a full pipe buffer returns EPIPE instead
|
||||||
print("ERROR: Pipe to stdout was broken", file=sys.stderr)
|
# of deadlocking (Windows anonymous pipes are ~4KB).
|
||||||
if level_number <= logging.DEBUG:
|
try:
|
||||||
traceback.print_exc(file=sys.stderr)
|
os.write(2, b"ERROR: Pipe to stdout was broken\n")
|
||||||
|
if level_number <= logging.DEBUG:
|
||||||
|
encoding = getattr(sys.stderr, "encoding", None) or "utf-8"
|
||||||
|
os.write(
|
||||||
|
2, traceback.format_exc().encode(encoding, "backslashreplace")
|
||||||
|
)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
return ERROR
|
# redirect stdout to os.devnull so that the exit cleanup doesn't
|
||||||
|
# produce "BrokenPipeError" when exiting.
|
||||||
|
devnull = os.open(os.devnull, os.O_WRONLY)
|
||||||
|
try:
|
||||||
|
os.dup2(devnull, 1)
|
||||||
|
finally:
|
||||||
|
os.close(devnull)
|
||||||
|
|
||||||
|
return BROKEN_STDOUT
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logger.critical("Operation cancelled by user")
|
logger.critical("Operation cancelled by user")
|
||||||
logger.debug("Exception information:", exc_info=True)
|
logger.debug("Exception information:", exc_info=True)
|
||||||
@@ -235,17 +253,6 @@ class Command(CommandContextMixIn):
|
|||||||
)
|
)
|
||||||
options.cache_dir = None
|
options.cache_dir = None
|
||||||
|
|
||||||
if (
|
|
||||||
"inprocess-build-deps" in options.features_enabled
|
|
||||||
and os.environ.get("PIP_CONSTRAINT", "")
|
|
||||||
and "build-constraint" not in options.features_enabled
|
|
||||||
):
|
|
||||||
logger.warning(
|
|
||||||
"In-process build dependencies are enabled, "
|
|
||||||
"PIP_CONSTRAINT will have no effect for build dependencies"
|
|
||||||
)
|
|
||||||
options.features_enabled.append("build-constraint")
|
|
||||||
|
|
||||||
return self._run_wrapper(level_number, options, args)
|
return self._run_wrapper(level_number, options, args)
|
||||||
|
|
||||||
def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
|
def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
|
||||||
|
|||||||
@@ -14,11 +14,14 @@ from __future__ import annotations
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import re
|
||||||
import textwrap
|
import textwrap
|
||||||
|
from collections.abc import Callable
|
||||||
|
from datetime import datetime, timedelta, timezone
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from optparse import SUPPRESS_HELP, Option, OptionGroup, OptionParser, Values
|
from optparse import SUPPRESS_HELP, Option, OptionGroup, OptionParser, Values
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from typing import Any, Callable
|
from typing import Any
|
||||||
|
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
|
|
||||||
@@ -32,6 +35,7 @@ from pip._internal.models.target_python import TargetPython
|
|||||||
from pip._internal.utils.datetime import parse_iso_datetime
|
from pip._internal.utils.datetime import parse_iso_datetime
|
||||||
from pip._internal.utils.hashes import STRONG_HASHES
|
from pip._internal.utils.hashes import STRONG_HASHES
|
||||||
from pip._internal.utils.misc import strtobool
|
from pip._internal.utils.misc import strtobool
|
||||||
|
from pip._internal.utils.urls import strip_extras
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -62,6 +66,37 @@ def make_option_group(group: dict[str, Any], parser: ConfigOptionParser) -> Opti
|
|||||||
return option_group
|
return option_group
|
||||||
|
|
||||||
|
|
||||||
|
def check_only_deps_option_does_not_conflict(options: Values) -> None:
|
||||||
|
"""Function for determining if --only-deps and other incompatible options are
|
||||||
|
specified.
|
||||||
|
|
||||||
|
:param options: The OptionParser options.
|
||||||
|
"""
|
||||||
|
if not options.only_dependencies:
|
||||||
|
return
|
||||||
|
conflicts = []
|
||||||
|
if options.ignore_dependencies:
|
||||||
|
conflicts.append("'--no-deps'")
|
||||||
|
if "legacy-resolver" in options.deprecated_features_enabled:
|
||||||
|
conflicts.append("'--use-deprecated legacy-resolver'")
|
||||||
|
if options.requirements:
|
||||||
|
conflicts.append("'--requirement'")
|
||||||
|
if options.requirements_from_scripts:
|
||||||
|
conflicts.append("'--requirements-from-script'")
|
||||||
|
if options.dependency_groups:
|
||||||
|
conflicts.append("'--group'")
|
||||||
|
if conflicts:
|
||||||
|
if len(conflicts) > 1:
|
||||||
|
conflicts[-1] = "or " + conflicts[-1]
|
||||||
|
conflict_message = ", ".join(conflicts)
|
||||||
|
raise CommandError(
|
||||||
|
f"Cannot use '--only-dependencies' in combination with {conflict_message}. "
|
||||||
|
"If this is unexpected, please refer to the user guide:\n"
|
||||||
|
"\n"
|
||||||
|
" https://pip.pypa.io/en/stable/user_guide/#installing-only-dependencies"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def check_dist_restriction(options: Values, check_target: bool = False) -> None:
|
def check_dist_restriction(options: Values, check_target: bool = False) -> None:
|
||||||
"""Function for determining if custom platform options are allowed.
|
"""Function for determining if custom platform options are allowed.
|
||||||
|
|
||||||
@@ -101,28 +136,21 @@ def check_dist_restriction(options: Values, check_target: bool = False) -> None:
|
|||||||
"installing via '--target' or using '--dry-run'"
|
"installing via '--target' or using '--dry-run'"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if dist_restriction_set:
|
||||||
|
# Lazy import to keep CLI startup fast
|
||||||
|
from pip._internal.utils import pylock as pylock_utils
|
||||||
|
|
||||||
def check_build_constraints(options: Values) -> None:
|
filenames = list(options.requirements)
|
||||||
"""Function for validating build constraints options.
|
filenames.extend(path for path, _ in options.dependency_groups)
|
||||||
|
for filename in filenames:
|
||||||
:param options: The OptionParser options.
|
filename_without_extras, _ = strip_extras(filename)
|
||||||
"""
|
if pylock_utils.is_valid_pylock_filename(filename_without_extras):
|
||||||
if hasattr(options, "build_constraints") and options.build_constraints:
|
raise CommandError(
|
||||||
if not options.build_isolation:
|
"Platform and interpreter constraints using "
|
||||||
raise CommandError(
|
"--python-version, --platform, --abi, or --implementation, "
|
||||||
"--build-constraint cannot be used with --no-build-isolation."
|
f"are not supported when selecting requirements "
|
||||||
)
|
f"from {filename_without_extras!r}"
|
||||||
|
)
|
||||||
# Import here to avoid circular imports
|
|
||||||
from pip._internal.network.session import PipSession
|
|
||||||
from pip._internal.req.req_file import get_file_content
|
|
||||||
|
|
||||||
# Eagerly check build constraints file contents
|
|
||||||
# is valid so that we don't fail in when trying
|
|
||||||
# to check constraints in isolated build process
|
|
||||||
with PipSession() as session:
|
|
||||||
for constraint_file in options.build_constraints:
|
|
||||||
get_file_content(constraint_file, session)
|
|
||||||
|
|
||||||
|
|
||||||
def _path_option_check(option: Option, opt: str, value: str) -> str:
|
def _path_option_check(option: Option, opt: str, value: str) -> str:
|
||||||
@@ -299,10 +327,19 @@ proxy: Callable[..., Option] = partial(
|
|||||||
"--proxy",
|
"--proxy",
|
||||||
dest="proxy",
|
dest="proxy",
|
||||||
type="str",
|
type="str",
|
||||||
default="",
|
default=None,
|
||||||
help="Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.",
|
help="Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
no_proxy_env: Callable[..., Option] = partial(
|
||||||
|
Option,
|
||||||
|
"--no-proxy-env",
|
||||||
|
dest="no_proxy_env",
|
||||||
|
action="store_true",
|
||||||
|
default=False,
|
||||||
|
help="Do not read proxy configuration from environment variables.",
|
||||||
|
)
|
||||||
|
|
||||||
retries: Callable[..., Option] = partial(
|
retries: Callable[..., Option] = partial(
|
||||||
Option,
|
Option,
|
||||||
"--retries",
|
"--retries",
|
||||||
@@ -434,8 +471,9 @@ def _handle_uploaded_prior_to(
|
|||||||
"""
|
"""
|
||||||
This is an optparse.Option callback for the --uploaded-prior-to option.
|
This is an optparse.Option callback for the --uploaded-prior-to option.
|
||||||
|
|
||||||
Parses an ISO 8601 datetime string. If no timezone is specified in the string,
|
Accepts either an ISO 8601 datetime string (e.g., '2023-01-01T00:00:00Z')
|
||||||
local timezone is used.
|
or a strict subset of ISO 8601 durations: PnD where n is a number of days
|
||||||
|
(e.g., 'P7D' for 7 days ago).
|
||||||
|
|
||||||
Note: This option only works with indexes that provide upload-time metadata
|
Note: This option only works with indexes that provide upload-time metadata
|
||||||
as specified in the simple repository API:
|
as specified in the simple repository API:
|
||||||
@@ -444,6 +482,18 @@ def _handle_uploaded_prior_to(
|
|||||||
if value is None:
|
if value is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
# Try ISO 8601 duration in PnD format. The leading 'P' disambiguates
|
||||||
|
# from absolute datetimes. Only whole days are supported; the format may
|
||||||
|
# be extended to more of the ISO 8601 duration syntax in the future if
|
||||||
|
# a real need is presented.
|
||||||
|
match = re.match(r"^P(\d+)D$", value, re.ASCII)
|
||||||
|
if match:
|
||||||
|
days = int(match.group(1))
|
||||||
|
parser.values.uploaded_prior_to = datetime.now(timezone.utc) - timedelta(
|
||||||
|
days=days
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
uploaded_prior_to = parse_iso_datetime(value)
|
uploaded_prior_to = parse_iso_datetime(value)
|
||||||
# Use local timezone if no offset is given in the ISO string.
|
# Use local timezone if no offset is given in the ISO string.
|
||||||
@@ -453,8 +503,9 @@ def _handle_uploaded_prior_to(
|
|||||||
except ValueError as exc:
|
except ValueError as exc:
|
||||||
msg = (
|
msg = (
|
||||||
f"invalid value: {value!r}: {exc}. "
|
f"invalid value: {value!r}: {exc}. "
|
||||||
f"Expected an ISO 8601 datetime string, "
|
f"Expected an ISO 8601 datetime string "
|
||||||
f"e.g '2023-01-01' or '2023-01-01T00:00:00Z'"
|
f"(e.g., '2023-01-01' or '2023-01-01T00:00:00Z') "
|
||||||
|
f"or a duration in days (e.g., 'P3D')"
|
||||||
)
|
)
|
||||||
raise_option_error(parser, option=option, msg=msg)
|
raise_option_error(parser, option=option, msg=msg)
|
||||||
|
|
||||||
@@ -463,15 +514,18 @@ def uploaded_prior_to() -> Option:
|
|||||||
return Option(
|
return Option(
|
||||||
"--uploaded-prior-to",
|
"--uploaded-prior-to",
|
||||||
dest="uploaded_prior_to",
|
dest="uploaded_prior_to",
|
||||||
metavar="datetime",
|
metavar="datetime_or_duration",
|
||||||
action="callback",
|
action="callback",
|
||||||
callback=_handle_uploaded_prior_to,
|
callback=_handle_uploaded_prior_to,
|
||||||
type="str",
|
type="str",
|
||||||
help=(
|
help=(
|
||||||
"Only consider packages uploaded prior to the given date time. "
|
"Only consider packages uploaded prior to the given value. "
|
||||||
"Accepts ISO 8601 strings (e.g., '2023-01-01T00:00:00Z'). "
|
"Accepts an ISO 8601 datetime (e.g., '2023-01-01T00:00:00Z', "
|
||||||
"Uses local timezone if none specified. Only effective when "
|
"uses local timezone if none specified) "
|
||||||
"installing from indexes that provide upload-time metadata."
|
"or duration in integer days with syntax `P<n>D` "
|
||||||
|
"(e.g., 'P3D' for packages uploaded at least 3 days ago). "
|
||||||
|
"Only effective when using indexes that provide "
|
||||||
|
"upload-time metadata."
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -524,8 +578,15 @@ def requirements() -> Option:
|
|||||||
action="append",
|
action="append",
|
||||||
default=[],
|
default=[],
|
||||||
metavar="file",
|
metavar="file",
|
||||||
help="Install from the given requirements file. "
|
help=(
|
||||||
"This option can be used multiple times.",
|
"Install from the given requirements file. "
|
||||||
|
"The file or URL can be in pip's requirements.txt format, "
|
||||||
|
"or pylock.toml format. "
|
||||||
|
"Extras may be selected from a pylock.toml file by "
|
||||||
|
"appending [extras] to the file name. "
|
||||||
|
"pylock.toml support is experimental. "
|
||||||
|
"This option can be used multiple times."
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -536,7 +597,7 @@ def requirements_from_scripts() -> Option:
|
|||||||
default=[],
|
default=[],
|
||||||
dest="requirements_from_scripts",
|
dest="requirements_from_scripts",
|
||||||
metavar="file",
|
metavar="file",
|
||||||
help="Install dependencies of the given script file"
|
help="Install dependencies of the given script file "
|
||||||
"as defined by PEP 723 inline metadata. ",
|
"as defined by PEP 723 inline metadata. ",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -615,12 +676,13 @@ def no_binary() -> Option:
|
|||||||
callback=_handle_no_binary,
|
callback=_handle_no_binary,
|
||||||
type="str",
|
type="str",
|
||||||
default=format_control,
|
default=format_control,
|
||||||
help="Do not use binary packages. Can be supplied multiple times, and "
|
help="Do not download binary packages. Cached binary packages may still "
|
||||||
'each time adds to the existing value. Accepts either ":all:" to '
|
"be used. Can be supplied multiple times, and each time adds to "
|
||||||
'disable all binary packages, ":none:" to empty the set (notice '
|
"the existing value. Accepts either ':all:' to disable all binary "
|
||||||
"the colons), or one or more package names with commas between "
|
"packages, ':none:' to empty the set (notice the colons), or one "
|
||||||
"them (no colons). Note that some packages are tricky to compile "
|
"or more package names with commas between them (no colons). "
|
||||||
"and may fail to install when this option is used on them.",
|
"Note that some packages are tricky to compile and may fail to "
|
||||||
|
"install when this option is used on them.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -790,15 +852,13 @@ python_version: Callable[..., Option] = partial(
|
|||||||
callback=_handle_python_version,
|
callback=_handle_python_version,
|
||||||
type="str",
|
type="str",
|
||||||
default=None,
|
default=None,
|
||||||
help=dedent(
|
help=dedent("""\
|
||||||
"""\
|
|
||||||
The Python interpreter version to use for wheel and "Requires-Python"
|
The Python interpreter version to use for wheel and "Requires-Python"
|
||||||
compatibility checks. Defaults to a version derived from the running
|
compatibility checks. Defaults to a version derived from the running
|
||||||
interpreter. The version can be specified using up to three dot-separated
|
interpreter. The version can be specified using up to three dot-separated
|
||||||
integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor
|
integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor
|
||||||
version can also be given as a string without dots (e.g. "37" for 3.7.0).
|
version can also be given as a string without dots (e.g. "37" for 3.7.0).
|
||||||
"""
|
"""),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -927,14 +987,67 @@ no_deps: Callable[..., Option] = partial(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _handle_refresh_package(
|
||||||
|
option: Option, opt_str: str, value: str, parser: OptionParser
|
||||||
|
) -> None:
|
||||||
|
if value.startswith("-"):
|
||||||
|
raise CommandError("--refresh-package option requires 1 argument.")
|
||||||
|
|
||||||
|
existing: set[str] = getattr(parser.values, option.dest)
|
||||||
|
|
||||||
|
new = value.split(",")
|
||||||
|
while ":all:" in new:
|
||||||
|
existing.clear()
|
||||||
|
existing.add(":all:")
|
||||||
|
del new[: new.index(":all:") + 1]
|
||||||
|
if ":none:" not in new:
|
||||||
|
return
|
||||||
|
|
||||||
|
for name in new:
|
||||||
|
if name == ":none:":
|
||||||
|
existing.clear()
|
||||||
|
else:
|
||||||
|
existing.add(canonicalize_name(name))
|
||||||
|
|
||||||
|
|
||||||
|
def refresh_package() -> Option:
|
||||||
|
return Option(
|
||||||
|
"--refresh-package",
|
||||||
|
dest="refresh_package",
|
||||||
|
action="callback",
|
||||||
|
callback=_handle_refresh_package,
|
||||||
|
type="str",
|
||||||
|
default=set(),
|
||||||
|
help="Refresh package index information for the given packages instead "
|
||||||
|
"of using cached responses. Accepts ':all:' to apply "
|
||||||
|
"to all packages, or a comma-separated list of package names.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
only_deps: Callable[..., Option] = partial(
|
||||||
|
Option,
|
||||||
|
"--only-deps",
|
||||||
|
"--only-dependencies",
|
||||||
|
dest="only_dependencies",
|
||||||
|
action="store_true",
|
||||||
|
default=False,
|
||||||
|
help=(
|
||||||
|
"Take only the dependencies of the provided requirements into account, "
|
||||||
|
"not the requirements themselves. Cannot be used in combination with "
|
||||||
|
"--no-deps, --group, --requirement, or --requirements-from-script. "
|
||||||
|
"No user-supplied requirements will be handled, even if they were "
|
||||||
|
"dependencies of other user-supplied requirements."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _handle_dependency_group(
|
def _handle_dependency_group(
|
||||||
option: Option, opt: str, value: str, parser: OptionParser
|
option: Option, opt: str, value: str, parser: OptionParser
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Process a value provided for the --group option.
|
Process a value provided for the --group option.
|
||||||
|
|
||||||
Splits on the rightmost ":", and validates that the path (if present) ends
|
Splits on the rightmost ":", and validates an explicit source filename.
|
||||||
in `pyproject.toml`. Defaults the path to `pyproject.toml` when one is not given.
|
|
||||||
|
|
||||||
`:` cannot appear in dependency group names, so this is a safe and simple parse.
|
`:` cannot appear in dependency group names, so this is a safe and simple parse.
|
||||||
|
|
||||||
@@ -944,10 +1057,15 @@ def _handle_dependency_group(
|
|||||||
if not sep:
|
if not sep:
|
||||||
path = "pyproject.toml"
|
path = "pyproject.toml"
|
||||||
else:
|
else:
|
||||||
# check for 'pyproject.toml' filenames using pathlib
|
# Local pyproject.toml paths may contain URL-like prefixes.
|
||||||
if pathlib.PurePath(path).name != "pyproject.toml":
|
if pathlib.PurePath(path).name != "pyproject.toml":
|
||||||
msg = "group paths use 'pyproject.toml' filenames"
|
# Keep lock parsing imports confined to commands that request it.
|
||||||
raise_option_error(parser, option=option, msg=msg)
|
from pip._internal.utils.pylock import is_valid_pylock_filename
|
||||||
|
|
||||||
|
filename, _ = strip_extras(path)
|
||||||
|
if not is_valid_pylock_filename(filename, allow_urls=False):
|
||||||
|
msg = "group paths use local 'pyproject.toml' or 'pylock.toml' files"
|
||||||
|
raise_option_error(parser, option=option, msg=msg)
|
||||||
|
|
||||||
parser.values.dependency_groups.append((path, groupname))
|
parser.values.dependency_groups.append((path, groupname))
|
||||||
|
|
||||||
@@ -961,8 +1079,8 @@ dependency_groups: Callable[..., Option] = partial(
|
|||||||
action="callback",
|
action="callback",
|
||||||
callback=_handle_dependency_group,
|
callback=_handle_dependency_group,
|
||||||
metavar="[path:]group",
|
metavar="[path:]group",
|
||||||
help='Install a named dependency-group from a "pyproject.toml" file. '
|
help='Install a named dependency-group from a "pyproject.toml" or '
|
||||||
'If a path is given, the name of the file must be "pyproject.toml". '
|
'"pylock.toml" file. Named "pylock.<name>.toml" files are also supported. '
|
||||||
'Defaults to using "pyproject.toml" in the current directory.',
|
'Defaults to using "pyproject.toml" in the current directory.',
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1134,6 +1252,17 @@ require_hashes: Callable[..., Option] = partial(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
no_require_hashes: Callable[..., Option] = partial(
|
||||||
|
Option,
|
||||||
|
"--no-require-hashes",
|
||||||
|
dest="no_require_hashes",
|
||||||
|
action="store_true",
|
||||||
|
default=False,
|
||||||
|
help="Do not automatically enable --require-hashes "
|
||||||
|
"when encountering a requirement with hashes.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
list_path: Callable[..., Option] = partial(
|
list_path: Callable[..., Option] = partial(
|
||||||
PipOption,
|
PipOption,
|
||||||
"--path",
|
"--path",
|
||||||
@@ -1175,6 +1304,7 @@ no_python_version_warning: Callable[..., Option] = partial(
|
|||||||
ALWAYS_ENABLED_FEATURES = [
|
ALWAYS_ENABLED_FEATURES = [
|
||||||
"truststore", # always on since 24.2
|
"truststore", # always on since 24.2
|
||||||
"no-binary-enable-wheel-cache", # always on since 23.1
|
"no-binary-enable-wheel-cache", # always on since 23.1
|
||||||
|
"build-constraint", # always on since 26.2
|
||||||
]
|
]
|
||||||
|
|
||||||
use_new_feature: Callable[..., Option] = partial(
|
use_new_feature: Callable[..., Option] = partial(
|
||||||
@@ -1186,8 +1316,8 @@ use_new_feature: Callable[..., Option] = partial(
|
|||||||
default=[],
|
default=[],
|
||||||
choices=[
|
choices=[
|
||||||
"fast-deps",
|
"fast-deps",
|
||||||
"build-constraint",
|
|
||||||
"inprocess-build-deps",
|
"inprocess-build-deps",
|
||||||
|
"venv-isolation",
|
||||||
]
|
]
|
||||||
+ ALWAYS_ENABLED_FEATURES,
|
+ ALWAYS_ENABLED_FEATURES,
|
||||||
help="Enable new functionality, that may be backward incompatible.",
|
help="Enable new functionality, that may be backward incompatible.",
|
||||||
@@ -1220,12 +1350,12 @@ general_group: dict[str, Any] = {
|
|||||||
require_virtualenv,
|
require_virtualenv,
|
||||||
python,
|
python,
|
||||||
verbose,
|
verbose,
|
||||||
version,
|
|
||||||
quiet,
|
quiet,
|
||||||
log,
|
log,
|
||||||
no_input,
|
no_input,
|
||||||
keyring_provider,
|
keyring_provider,
|
||||||
proxy,
|
proxy,
|
||||||
|
no_proxy_env,
|
||||||
retries,
|
retries,
|
||||||
timeout,
|
timeout,
|
||||||
exists_action,
|
exists_action,
|
||||||
@@ -1249,6 +1379,7 @@ index_group: dict[str, Any] = {
|
|||||||
index_url,
|
index_url,
|
||||||
extra_index_url,
|
extra_index_url,
|
||||||
no_index,
|
no_index,
|
||||||
|
refresh_package,
|
||||||
find_links,
|
find_links,
|
||||||
uploaded_prior_to,
|
uploaded_prior_to,
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ so commands which don't always hit the network (e.g. list w/o --outdated or
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
from collections.abc import Iterator
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from optparse import Values
|
from optparse import Values
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
@@ -26,16 +27,13 @@ if TYPE_CHECKING:
|
|||||||
from pip._vendor.packaging.utils import NormalizedName
|
from pip._vendor.packaging.utils import NormalizedName
|
||||||
|
|
||||||
from pip._internal.network.session import PipSession
|
from pip._internal.network.session import PipSession
|
||||||
|
from pip._internal.self_outdated_check import UpgradePrompt
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@lru_cache
|
@lru_cache
|
||||||
def _create_truststore_ssl_context() -> SSLContext | None:
|
def _create_truststore_ssl_context() -> SSLContext | None:
|
||||||
if sys.version_info < (3, 10):
|
|
||||||
logger.debug("Disabling truststore because Python version isn't 3.10+")
|
|
||||||
return None
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import ssl
|
import ssl
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@@ -102,6 +100,13 @@ class SessionCommandMixin(CommandContextMixIn):
|
|||||||
else:
|
else:
|
||||||
ssl_context = None
|
ssl_context = None
|
||||||
|
|
||||||
|
has_custom_ca = bool(options.cert)
|
||||||
|
if options.proxy is None and not options.no_proxy_env:
|
||||||
|
# Requests reads CA bundle environment variables only with trust_env.
|
||||||
|
has_custom_ca = has_custom_ca or bool(
|
||||||
|
os.environ.get("REQUESTS_CA_BUNDLE") or os.environ.get("CURL_CA_BUNDLE")
|
||||||
|
)
|
||||||
|
|
||||||
session = PipSession(
|
session = PipSession(
|
||||||
cache=os.path.join(cache_dir, "http-v2") if cache_dir else None,
|
cache=os.path.join(cache_dir, "http-v2") if cache_dir else None,
|
||||||
retries=retries if retries is not None else options.retries,
|
retries=retries if retries is not None else options.retries,
|
||||||
@@ -109,6 +114,8 @@ class SessionCommandMixin(CommandContextMixIn):
|
|||||||
trusted_hosts=options.trusted_hosts,
|
trusted_hosts=options.trusted_hosts,
|
||||||
index_urls=self._get_index_urls(options),
|
index_urls=self._get_index_urls(options),
|
||||||
ssl_context=ssl_context,
|
ssl_context=ssl_context,
|
||||||
|
use_ssl_context_for_proxy=not has_custom_ca,
|
||||||
|
refresh_package=getattr(options, "refresh_package", set()),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Handle custom ca-bundles from the user
|
# Handle custom ca-bundles from the user
|
||||||
@@ -123,14 +130,18 @@ class SessionCommandMixin(CommandContextMixIn):
|
|||||||
if options.timeout or timeout:
|
if options.timeout or timeout:
|
||||||
session.timeout = timeout if timeout is not None else options.timeout
|
session.timeout = timeout if timeout is not None else options.timeout
|
||||||
|
|
||||||
# Handle configured proxies
|
# An explicit --proxy (including "" to disable proxying) or --no-proxy-env
|
||||||
if options.proxy:
|
# makes the session ignore environment proxies; unset --proxy is None.
|
||||||
session.proxies = {
|
if options.proxy is not None or options.no_proxy_env:
|
||||||
"http": options.proxy,
|
if options.proxy:
|
||||||
"https": options.proxy,
|
session.proxies = {
|
||||||
}
|
"http": options.proxy,
|
||||||
|
"https": options.proxy,
|
||||||
|
}
|
||||||
session.trust_env = False
|
session.trust_env = False
|
||||||
|
# Keep "" so an empty --proxy reaches build subprocesses.
|
||||||
session.pip_proxy = options.proxy
|
session.pip_proxy = options.proxy
|
||||||
|
session.pip_no_proxy_env = options.no_proxy_env
|
||||||
|
|
||||||
# Determine if we can prompt the user for authentication or not
|
# Determine if we can prompt the user for authentication or not
|
||||||
session.auth.prompting = not options.no_input
|
session.auth.prompting = not options.no_input
|
||||||
@@ -139,10 +150,18 @@ class SessionCommandMixin(CommandContextMixIn):
|
|||||||
return session
|
return session
|
||||||
|
|
||||||
|
|
||||||
def _pip_self_version_check(session: PipSession, options: Values) -> None:
|
def _pip_self_version_check_fetch(
|
||||||
from pip._internal.self_outdated_check import pip_self_version_check as check
|
session: PipSession, options: Values
|
||||||
|
) -> UpgradePrompt | None:
|
||||||
|
from pip._internal.self_outdated_check import pip_self_version_check_fetch
|
||||||
|
|
||||||
check(session, options)
|
return pip_self_version_check_fetch(session, options)
|
||||||
|
|
||||||
|
|
||||||
|
def _pip_self_version_check_emit(upgrade_prompt: UpgradePrompt | None) -> None:
|
||||||
|
from pip._internal.self_outdated_check import pip_self_version_check_emit
|
||||||
|
|
||||||
|
pip_self_version_check_emit(upgrade_prompt)
|
||||||
|
|
||||||
|
|
||||||
class IndexGroupCommand(Command, SessionCommandMixin):
|
class IndexGroupCommand(Command, SessionCommandMixin):
|
||||||
@@ -169,7 +188,8 @@ class IndexGroupCommand(Command, SessionCommandMixin):
|
|||||||
# No specific setting: exclude prereleases by default
|
# No specific setting: exclude prereleases by default
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def handle_pip_version_check(self, options: Values) -> None:
|
@contextlib.contextmanager
|
||||||
|
def pip_version_check(self, options: Values, args: list[str]) -> Iterator[None]:
|
||||||
"""
|
"""
|
||||||
Do the pip version check if not disabled.
|
Do the pip version check if not disabled.
|
||||||
|
|
||||||
@@ -179,17 +199,27 @@ class IndexGroupCommand(Command, SessionCommandMixin):
|
|||||||
assert hasattr(options, "no_index")
|
assert hasattr(options, "no_index")
|
||||||
|
|
||||||
if options.disable_pip_version_check or options.no_index:
|
if options.disable_pip_version_check or options.no_index:
|
||||||
|
yield
|
||||||
return
|
return
|
||||||
|
|
||||||
|
upgrade_prompt: UpgradePrompt | None = None
|
||||||
try:
|
try:
|
||||||
# Otherwise, check if we're using the latest version of pip available.
|
|
||||||
session = self._build_session(
|
session = self._build_session(
|
||||||
options,
|
options,
|
||||||
retries=0,
|
retries=0,
|
||||||
timeout=min(5, options.timeout),
|
timeout=min(5, options.timeout),
|
||||||
)
|
)
|
||||||
with session:
|
with session:
|
||||||
_pip_self_version_check(session, options)
|
upgrade_prompt = _pip_self_version_check_fetch(session, options)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warning("There was an error checking the latest version of pip.")
|
logger.warning("There was an error checking the latest version of pip.")
|
||||||
logger.debug("See below for error", exc_info=True)
|
logger.debug("See below for error", exc_info=True)
|
||||||
|
|
||||||
|
try:
|
||||||
|
yield
|
||||||
|
finally:
|
||||||
|
try:
|
||||||
|
_pip_self_version_check_emit(upgrade_prompt)
|
||||||
|
except Exception:
|
||||||
|
logger.warning("There was an error checking the latest version of pip.")
|
||||||
|
logger.debug("See below for error", exc_info=True)
|
||||||
@@ -38,7 +38,16 @@ logger = logging.getLogger(__name__)
|
|||||||
# main, this should not be an issue in practice.
|
# main, this should not be an issue in practice.
|
||||||
|
|
||||||
|
|
||||||
|
def cli(args: list[str] | None = None) -> int:
|
||||||
|
"""Run the CLI with imports blocked until process exit after installation."""
|
||||||
|
return _main(args, cli=True)
|
||||||
|
|
||||||
|
|
||||||
def main(args: list[str] | None = None) -> int:
|
def main(args: list[str] | None = None) -> int:
|
||||||
|
return _main(args, cli=False)
|
||||||
|
|
||||||
|
|
||||||
|
def _main(args: list[str] | None, *, cli: bool) -> int:
|
||||||
# NOTE: Lazy imports to speed up import of this module,
|
# NOTE: Lazy imports to speed up import of this module,
|
||||||
# which is imported from the pip console script. This doesn't
|
# which is imported from the pip console script. This doesn't
|
||||||
# speed up normal pip execution, but might be important in the future
|
# speed up normal pip execution, but might be important in the future
|
||||||
@@ -73,13 +82,16 @@ def main(args: list[str] | None = None) -> int:
|
|||||||
sys.stderr.write(os.linesep)
|
sys.stderr.write(os.linesep)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Needed for locale.getpreferredencoding(False) to work
|
# Needed for locale encoding detection to work
|
||||||
# in pip._internal.utils.encoding.auto_decode
|
# in pip._internal.utils.encoding.auto_decode
|
||||||
|
# TODO: Re-evaluate whether this is still needed once pip drops Python 3.10.
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, "")
|
locale.setlocale(locale.LC_ALL, "")
|
||||||
except locale.Error as e:
|
except locale.Error as e:
|
||||||
# setlocale can apparently crash if locale are uninitialized
|
# setlocale can apparently crash if locale are uninitialized
|
||||||
logger.debug("Ignoring error %s when setting locale", e)
|
logger.debug("Ignoring error %s when setting locale", e)
|
||||||
|
|
||||||
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
|
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
|
||||||
|
command._cli = cli
|
||||||
|
|
||||||
return command.main(cmd_args)
|
return command.main(cmd_args)
|
||||||
@@ -8,12 +8,11 @@ import sys
|
|||||||
|
|
||||||
from pip._vendor.rich.markup import escape
|
from pip._vendor.rich.markup import escape
|
||||||
|
|
||||||
from pip._internal.build_env import get_runnable_pip
|
|
||||||
from pip._internal.cli import cmdoptions
|
from pip._internal.cli import cmdoptions
|
||||||
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
||||||
from pip._internal.commands import commands_dict, get_similar_commands
|
from pip._internal.commands import commands_dict, get_similar_commands
|
||||||
from pip._internal.exceptions import CommandError
|
from pip._internal.exceptions import CommandError
|
||||||
from pip._internal.utils.misc import get_pip_version, get_prog
|
from pip._internal.utils.misc import get_pip_version, get_prog, get_runnable_pip
|
||||||
|
|
||||||
__all__ = ["create_main_parser", "parse_command"]
|
__all__ = ["create_main_parser", "parse_command"]
|
||||||
|
|
||||||
@@ -31,6 +30,7 @@ def create_main_parser() -> ConfigOptionParser:
|
|||||||
parser.disable_interspersed_args()
|
parser.disable_interspersed_args()
|
||||||
|
|
||||||
parser.version = get_pip_version()
|
parser.version = get_pip_version()
|
||||||
|
parser.add_option(cmdoptions.version())
|
||||||
|
|
||||||
# add the general options
|
# add the general options
|
||||||
gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, parser)
|
gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, parser)
|
||||||
@@ -97,13 +97,23 @@ def parse_command(args: list[str]) -> tuple[str, list[str]]:
|
|||||||
|
|
||||||
# Set a flag so the child doesn't re-invoke itself, causing
|
# Set a flag so the child doesn't re-invoke itself, causing
|
||||||
# an infinite loop.
|
# an infinite loop.
|
||||||
os.environ["_PIP_RUNNING_IN_SUBPROCESS"] = "1"
|
subprocess_env = os.environ.copy()
|
||||||
returncode = 0
|
subprocess_env["_PIP_RUNNING_IN_SUBPROCESS"] = "1"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
proc = subprocess.run(pip_cmd)
|
# Based on CPython's test-runner interrupt cleanup:
|
||||||
returncode = proc.returncode
|
# https://github.com/python/cpython/blob/6c695bfad45ddde73d0d674286800fbe295f0627/Lib/test/libregrtest/main.py#L728-L739
|
||||||
|
with subprocess.Popen(pip_cmd, env=subprocess_env) as proc:
|
||||||
|
try:
|
||||||
|
returncode = proc.wait()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
# Reap before warning or traceback rendering reads replaced files.
|
||||||
|
proc.kill()
|
||||||
|
proc.wait()
|
||||||
|
returncode = 1
|
||||||
except (subprocess.SubprocessError, OSError) as exc:
|
except (subprocess.SubprocessError, OSError) as exc:
|
||||||
raise CommandError(f"Failed to run pip under {interpreter}: {exc}")
|
raise CommandError(f"Failed to run pip under {interpreter}: {exc}")
|
||||||
|
|
||||||
sys.exit(returncode)
|
sys.exit(returncode)
|
||||||
|
|
||||||
# --version
|
# --version
|
||||||
|
|||||||
@@ -11,16 +11,18 @@ import sys
|
|||||||
import textwrap
|
import textwrap
|
||||||
from collections.abc import Generator
|
from collections.abc import Generator
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from typing import Any, NoReturn
|
from typing import TYPE_CHECKING, Any, NoReturn
|
||||||
|
|
||||||
from pip._vendor.rich.markup import escape
|
from pip._vendor.rich.markup import escape
|
||||||
from pip._vendor.rich.theme import Theme
|
from pip._vendor.rich.theme import Theme
|
||||||
|
|
||||||
from pip._internal.cli.status_codes import UNKNOWN_ERROR
|
from pip._internal.cli.status_codes import UNKNOWN_ERROR
|
||||||
from pip._internal.configuration import Configuration, ConfigurationError
|
from pip._internal.configuration import Configuration, ConfigurationError
|
||||||
from pip._internal.utils.logging import PipConsole
|
|
||||||
from pip._internal.utils.misc import redact_auth_from_url, strtobool
|
from pip._internal.utils.misc import redact_auth_from_url, strtobool
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from pip._internal.utils.logging import PipConsole
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -212,7 +214,6 @@ class ConfigOptionParser(CustomOptionParser):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.name = name
|
self.name = name
|
||||||
self.config = Configuration(isolated)
|
self.config = Configuration(isolated)
|
||||||
|
|
||||||
assert self.name
|
assert self.name
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
@@ -220,7 +221,14 @@ class ConfigOptionParser(CustomOptionParser):
|
|||||||
try:
|
try:
|
||||||
return option.check_value(key, val)
|
return option.check_value(key, val)
|
||||||
except optparse.OptionValueError as exc:
|
except optparse.OptionValueError as exc:
|
||||||
print(f"An error occurred during configuration: {exc}")
|
logger.error(
|
||||||
|
"An error occurred during configuration: %s. "
|
||||||
|
"Check your pip configuration files or "
|
||||||
|
"environment variables for this value. "
|
||||||
|
"See https://pip.pypa.io/en/stable/topics/configuration/ "
|
||||||
|
"for more information.",
|
||||||
|
exc,
|
||||||
|
)
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
|
||||||
def _get_ordered_configuration_items(
|
def _get_ordered_configuration_items(
|
||||||
@@ -344,7 +352,7 @@ class ConfigOptionParser(CustomOptionParser):
|
|||||||
self.print_usage(sys.stderr)
|
self.print_usage(sys.stderr)
|
||||||
self.exit(UNKNOWN_ERROR, f"{msg}\n")
|
self.exit(UNKNOWN_ERROR, f"{msg}\n")
|
||||||
|
|
||||||
def print_help(self, file: Any = None) -> None:
|
def _create_console_for_help(self, file: Any = None) -> PipConsole:
|
||||||
# This is unfortunate but necessary since arguments may have not been
|
# This is unfortunate but necessary since arguments may have not been
|
||||||
# parsed yet at this point, so detect --no-color manually.
|
# parsed yet at this point, so detect --no-color manually.
|
||||||
no_color = (
|
no_color = (
|
||||||
@@ -352,7 +360,19 @@ class ConfigOptionParser(CustomOptionParser):
|
|||||||
or bool(strtobool(os.environ.get("PIP_NO_COLOR", "no") or "no"))
|
or bool(strtobool(os.environ.get("PIP_NO_COLOR", "no") or "no"))
|
||||||
or "NO_COLOR" in os.environ
|
or "NO_COLOR" in os.environ
|
||||||
)
|
)
|
||||||
console = PipConsole(
|
# Imported lazily: rich's console stack is only needed when help is
|
||||||
|
# actually rendered, not when this module is imported for `--version`.
|
||||||
|
from pip._internal.utils.logging import PipConsole
|
||||||
|
|
||||||
|
return PipConsole(
|
||||||
theme=Theme(PrettyHelpFormatter.styles), no_color=no_color, file=file
|
theme=Theme(PrettyHelpFormatter.styles), no_color=no_color, file=file
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def print_usage(self, file: Any = None) -> None:
|
||||||
|
if self.usage:
|
||||||
|
console = self._create_console_for_help(file)
|
||||||
|
console.print(self.get_usage(), highlight=False)
|
||||||
|
|
||||||
|
def print_help(self, file: Any = None) -> None:
|
||||||
|
console = self._create_console_for_help(file)
|
||||||
console.print(self.format_help().rstrip(), highlight=False)
|
console.print(self.format_help().rstrip(), highlight=False)
|
||||||
@@ -2,8 +2,8 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import functools
|
import functools
|
||||||
import sys
|
import sys
|
||||||
from collections.abc import Generator, Iterable, Iterator
|
from collections.abc import Callable, Generator, Iterable, Iterator
|
||||||
from typing import TYPE_CHECKING, Callable, Literal, TypeVar
|
from typing import TYPE_CHECKING, Literal, TypeVar
|
||||||
|
|
||||||
from pip._vendor.rich.progress import (
|
from pip._vendor.rich.progress import (
|
||||||
BarColumn,
|
BarColumn,
|
||||||
|
|||||||
@@ -9,12 +9,17 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
from collections.abc import Callable
|
||||||
|
from dataclasses import dataclass, field
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
from itertools import chain
|
||||||
from optparse import Values
|
from optparse import Values
|
||||||
from typing import Any, Callable, TypeVar
|
from pathlib import Path
|
||||||
|
from typing import Any, TypeVar
|
||||||
|
|
||||||
from pip._internal.build_env import (
|
from pip._internal.build_env import (
|
||||||
BuildEnvironmentInstaller,
|
BuildEnvironmentInstaller,
|
||||||
|
BuildIsolationMode,
|
||||||
InprocessBuildEnvironmentInstaller,
|
InprocessBuildEnvironmentInstaller,
|
||||||
SubprocessBuildEnvironmentInstaller,
|
SubprocessBuildEnvironmentInstaller,
|
||||||
)
|
)
|
||||||
@@ -39,37 +44,98 @@ from pip._internal.req.constructors import (
|
|||||||
install_req_from_editable,
|
install_req_from_editable,
|
||||||
install_req_from_line,
|
install_req_from_line,
|
||||||
install_req_from_parsed_requirement,
|
install_req_from_parsed_requirement,
|
||||||
|
install_req_from_pylock_package,
|
||||||
install_req_from_req_string,
|
install_req_from_req_string,
|
||||||
)
|
)
|
||||||
from pip._internal.req.pep723 import PEP723Exception, pep723_metadata
|
from pip._internal.req.pep723 import PEP723Exception, pep723_metadata
|
||||||
from pip._internal.req.req_dependency_group import parse_dependency_groups
|
from pip._internal.req.req_dependency_group import parse_dependency_groups
|
||||||
from pip._internal.req.req_file import parse_requirements
|
from pip._internal.req.req_file import get_file_content, parse_requirements
|
||||||
from pip._internal.req.req_install import InstallRequirement
|
from pip._internal.req.req_install import InstallRequirement
|
||||||
from pip._internal.resolution.base import BaseResolver
|
from pip._internal.resolution.base import BaseResolver
|
||||||
from pip._internal.utils.packaging import check_requires_python
|
from pip._internal.utils.packaging import check_requires_python
|
||||||
|
from pip._internal.utils.pylock import (
|
||||||
|
is_valid_pylock_filename,
|
||||||
|
select_from_pylock_path_or_url,
|
||||||
|
)
|
||||||
from pip._internal.utils.temp_dir import (
|
from pip._internal.utils.temp_dir import (
|
||||||
TempDirectory,
|
TempDirectory,
|
||||||
|
TempDirectoryKind,
|
||||||
TempDirectoryTypeRegistry,
|
TempDirectoryTypeRegistry,
|
||||||
tempdir_kinds,
|
|
||||||
)
|
)
|
||||||
|
from pip._internal.utils.urls import strip_extras
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def should_ignore_regular_constraints(options: Values) -> bool:
|
@dataclass
|
||||||
|
class _PylockRequest:
|
||||||
|
"""Accumulate one lock's selectors before evaluating its package markers."""
|
||||||
|
|
||||||
|
filename: str
|
||||||
|
extras: set[str] = field(default_factory=set)
|
||||||
|
dependency_groups: set[str] = field(default_factory=set)
|
||||||
|
include_default_groups: bool = False
|
||||||
|
|
||||||
|
|
||||||
|
def _pylock_source_key(filename: str) -> tuple[str, str, str]:
|
||||||
|
"""Identify a source together with the base used for its relative artifacts."""
|
||||||
|
if filename.lower().startswith(("http:", "https:", "file:")):
|
||||||
|
return "url", filename, ""
|
||||||
|
# Preserve case and parent components because either can change which file opens.
|
||||||
|
source = str(Path(filename).absolute())
|
||||||
|
artifact_base = str(Path(os.path.dirname(filename)).absolute())
|
||||||
|
return "path", source, artifact_base
|
||||||
|
|
||||||
|
|
||||||
|
def _collect_requirement_sources(
|
||||||
|
requirements: list[str], groups: list[tuple[str, str]]
|
||||||
|
) -> tuple[list[str | _PylockRequest], list[tuple[str, str]]]:
|
||||||
|
"""Combine selectors for each lock while retaining separate project inputs."""
|
||||||
|
pylocks: dict[tuple[str, str, str], _PylockRequest] = {}
|
||||||
|
requirement_files: list[str | _PylockRequest] = []
|
||||||
|
project_groups: list[tuple[str, str]] = []
|
||||||
|
|
||||||
|
sources = chain(((filename, None) for filename in requirements), groups)
|
||||||
|
for source, group in sources:
|
||||||
|
filename, extras = strip_extras(source)
|
||||||
|
if not is_valid_pylock_filename(filename):
|
||||||
|
if group is None:
|
||||||
|
requirement_files.append(source)
|
||||||
|
else:
|
||||||
|
project_groups.append((source, group))
|
||||||
|
continue
|
||||||
|
|
||||||
|
key = _pylock_source_key(filename)
|
||||||
|
if key not in pylocks:
|
||||||
|
pylocks[key] = _PylockRequest(filename)
|
||||||
|
requirement_files.append(pylocks[key])
|
||||||
|
request = pylocks[key]
|
||||||
|
request.extras.update(extras)
|
||||||
|
if group is None:
|
||||||
|
request.include_default_groups = True
|
||||||
|
else:
|
||||||
|
request.dependency_groups.add(group)
|
||||||
|
|
||||||
|
return requirement_files, project_groups
|
||||||
|
|
||||||
|
|
||||||
|
def should_ignore_regular_constraints() -> bool:
|
||||||
"""
|
"""
|
||||||
Check if regular constraints should be ignored because
|
Whether this process should ignore the regular constraints it inherits.
|
||||||
we are in a isolated build process and build constraints
|
|
||||||
feature is enabled but no build constraints were passed.
|
The parent pip sets ``_PIP_IN_BUILD_IGNORE_CONSTRAINTS`` whenever it starts
|
||||||
|
an isolated build in a subprocess, so that regular constraints the build
|
||||||
|
inherits (such as via ``PIP_CONSTRAINT`` or config files) do not affect it.
|
||||||
|
Only build constraints apply there.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return os.environ.get("_PIP_IN_BUILD_IGNORE_CONSTRAINTS") == "1"
|
return os.environ.get("_PIP_IN_BUILD_IGNORE_CONSTRAINTS") == "1"
|
||||||
|
|
||||||
|
|
||||||
KEEPABLE_TEMPDIR_TYPES = [
|
KEEPABLE_TEMPDIR_TYPES = [
|
||||||
tempdir_kinds.BUILD_ENV,
|
TempDirectoryKind.BUILD_ENV,
|
||||||
tempdir_kinds.EPHEM_WHEEL_CACHE,
|
TempDirectoryKind.EPHEM_WHEEL_CACHE,
|
||||||
tempdir_kinds.REQ_BUILD,
|
TempDirectoryKind.REQ_BUILD,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -136,6 +202,20 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
self.cmd_opts.add_option(cmdoptions.dependency_groups())
|
self.cmd_opts.add_option(cmdoptions.dependency_groups())
|
||||||
self.cmd_opts.add_option(cmdoptions.no_clean())
|
self.cmd_opts.add_option(cmdoptions.no_clean())
|
||||||
|
|
||||||
|
def check_build_constraints(self, options: Values) -> None:
|
||||||
|
"""Check build constraints with the command's network session."""
|
||||||
|
if not options.build_constraints:
|
||||||
|
return
|
||||||
|
|
||||||
|
if not options.build_isolation:
|
||||||
|
raise CommandError(
|
||||||
|
"--build-constraint cannot be used with --no-build-isolation."
|
||||||
|
)
|
||||||
|
|
||||||
|
session = self.get_default_session(options)
|
||||||
|
for constraint_file in options.build_constraints:
|
||||||
|
get_file_content(constraint_file, session)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def determine_resolver_variant(options: Values) -> str:
|
def determine_resolver_variant(options: Values) -> str:
|
||||||
"""Determines which resolver should be used, based on the given options."""
|
"""Determines which resolver should be used, based on the given options."""
|
||||||
@@ -152,6 +232,8 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
build_tracker: BuildTracker,
|
build_tracker: BuildTracker,
|
||||||
session: PipSession,
|
session: PipSession,
|
||||||
finder: PackageFinder,
|
finder: PackageFinder,
|
||||||
|
*,
|
||||||
|
allow_editables: bool,
|
||||||
use_user_site: bool,
|
use_user_site: bool,
|
||||||
download_dir: str | None = None,
|
download_dir: str | None = None,
|
||||||
verbosity: int = 0,
|
verbosity: int = 0,
|
||||||
@@ -184,9 +266,6 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
|
|
||||||
# Handle build constraints
|
# Handle build constraints
|
||||||
build_constraints = getattr(options, "build_constraints", [])
|
build_constraints = getattr(options, "build_constraints", [])
|
||||||
build_constraint_feature_enabled = (
|
|
||||||
"build-constraint" in options.features_enabled
|
|
||||||
)
|
|
||||||
|
|
||||||
env_installer: BuildEnvironmentInstaller
|
env_installer: BuildEnvironmentInstaller
|
||||||
if "inprocess-build-deps" in options.features_enabled:
|
if "inprocess-build-deps" in options.features_enabled:
|
||||||
@@ -204,14 +283,26 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
env_installer = SubprocessBuildEnvironmentInstaller(
|
env_installer = SubprocessBuildEnvironmentInstaller(
|
||||||
finder,
|
finder,
|
||||||
build_constraints=build_constraints,
|
build_constraints=build_constraints,
|
||||||
build_constraint_feature_enabled=build_constraint_feature_enabled,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not options.build_isolation:
|
||||||
|
build_isolation: BuildIsolationMode = "off"
|
||||||
|
elif "venv-isolation" in options.features_enabled:
|
||||||
|
build_isolation = "venv"
|
||||||
|
if "inprocess-build-deps" in options.features_enabled:
|
||||||
|
logger.warning(
|
||||||
|
"Using --use-feature 'inprocess-build-deps' and 'venv-isolation'"
|
||||||
|
" together is currently partially supported. If you encounter"
|
||||||
|
" broken behaviour, use only one feature."
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
build_isolation = "virtual"
|
||||||
|
|
||||||
return RequirementPreparer(
|
return RequirementPreparer(
|
||||||
build_dir=temp_build_dir_path,
|
build_dir=temp_build_dir_path,
|
||||||
src_dir=options.src_dir,
|
src_dir=options.src_dir,
|
||||||
download_dir=download_dir,
|
download_dir=download_dir,
|
||||||
build_isolation=options.build_isolation,
|
build_isolation=build_isolation,
|
||||||
build_isolation_installer=env_installer,
|
build_isolation_installer=env_installer,
|
||||||
check_build_deps=options.check_build_deps,
|
check_build_deps=options.check_build_deps,
|
||||||
build_tracker=build_tracker,
|
build_tracker=build_tracker,
|
||||||
@@ -223,6 +314,7 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
lazy_wheel=lazy_wheel,
|
lazy_wheel=lazy_wheel,
|
||||||
verbosity=verbosity,
|
verbosity=verbosity,
|
||||||
legacy_resolver=legacy_resolver,
|
legacy_resolver=legacy_resolver,
|
||||||
|
allow_editables=allow_editables,
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -260,6 +352,7 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
make_install_req=make_install_req,
|
make_install_req=make_install_req,
|
||||||
use_user_site=use_user_site,
|
use_user_site=use_user_site,
|
||||||
ignore_dependencies=options.ignore_dependencies,
|
ignore_dependencies=options.ignore_dependencies,
|
||||||
|
only_dependencies=options.only_dependencies,
|
||||||
ignore_installed=ignore_installed,
|
ignore_installed=ignore_installed,
|
||||||
ignore_requires_python=ignore_requires_python,
|
ignore_requires_python=ignore_requires_python,
|
||||||
force_reinstall=force_reinstall,
|
force_reinstall=force_reinstall,
|
||||||
@@ -275,6 +368,7 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
make_install_req=make_install_req,
|
make_install_req=make_install_req,
|
||||||
use_user_site=use_user_site,
|
use_user_site=use_user_site,
|
||||||
ignore_dependencies=options.ignore_dependencies,
|
ignore_dependencies=options.ignore_dependencies,
|
||||||
|
only_dependencies=options.only_dependencies,
|
||||||
ignore_installed=ignore_installed,
|
ignore_installed=ignore_installed,
|
||||||
ignore_requires_python=ignore_requires_python,
|
ignore_requires_python=ignore_requires_python,
|
||||||
force_reinstall=force_reinstall,
|
force_reinstall=force_reinstall,
|
||||||
@@ -293,12 +387,19 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
Parse command-line arguments into the corresponding requirements.
|
Parse command-line arguments into the corresponding requirements.
|
||||||
"""
|
"""
|
||||||
requirements: list[InstallRequirement] = []
|
requirements: list[InstallRequirement] = []
|
||||||
|
requirement_sources, project_groups = _collect_requirement_sources(
|
||||||
|
options.requirements, options.dependency_groups
|
||||||
|
)
|
||||||
|
|
||||||
if not should_ignore_regular_constraints(options):
|
if should_ignore_regular_constraints():
|
||||||
constraints = parse_constraint_files(
|
# Inside an isolated build subprocess: apply the build constraints
|
||||||
options.constraints, finder, options, session
|
# (forwarded via --build-constraint) instead of the inherited ones.
|
||||||
)
|
constraint_files = getattr(options, "build_constraints", [])
|
||||||
requirements.extend(constraints)
|
else:
|
||||||
|
constraint_files = options.constraints
|
||||||
|
|
||||||
|
constraints = parse_constraint_files(constraint_files, finder, options, session)
|
||||||
|
requirements.extend(constraints)
|
||||||
|
|
||||||
for req in args:
|
for req in args:
|
||||||
if not req.strip():
|
if not req.strip():
|
||||||
@@ -312,8 +413,8 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
)
|
)
|
||||||
requirements.append(req_to_add)
|
requirements.append(req_to_add)
|
||||||
|
|
||||||
if options.dependency_groups:
|
if project_groups:
|
||||||
for req in parse_dependency_groups(options.dependency_groups):
|
for req in parse_dependency_groups(project_groups):
|
||||||
req_to_add = install_req_from_req_string(
|
req_to_add = install_req_from_req_string(
|
||||||
req,
|
req,
|
||||||
isolated=options.isolated_mode,
|
isolated=options.isolated_mode,
|
||||||
@@ -331,9 +432,34 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
requirements.append(req_to_add)
|
requirements.append(req_to_add)
|
||||||
|
|
||||||
# NOTE: options.require_hashes may be set if --require-hashes is True
|
# NOTE: options.require_hashes may be set if --require-hashes is True
|
||||||
for filename in options.requirements:
|
for source in requirement_sources:
|
||||||
|
if isinstance(source, _PylockRequest):
|
||||||
|
logger.warning(
|
||||||
|
"Using pylock.toml as a requirements source "
|
||||||
|
"is an experimental feature. "
|
||||||
|
"It may be removed/changed in a future release "
|
||||||
|
"without prior warning."
|
||||||
|
)
|
||||||
|
for package, package_dist in select_from_pylock_path_or_url(
|
||||||
|
source.filename,
|
||||||
|
session=session,
|
||||||
|
format_control=options.format_control,
|
||||||
|
extras=source.extras,
|
||||||
|
dependency_groups=source.dependency_groups,
|
||||||
|
include_default_groups=source.include_default_groups,
|
||||||
|
):
|
||||||
|
req_to_add, locked_link = install_req_from_pylock_package(
|
||||||
|
package,
|
||||||
|
package_dist,
|
||||||
|
source.filename,
|
||||||
|
user_supplied=True,
|
||||||
|
)
|
||||||
|
requirements.append(req_to_add)
|
||||||
|
if locked_link:
|
||||||
|
finder.add_locked_link(package.name, locked_link)
|
||||||
|
continue
|
||||||
for parsed_req in parse_requirements(
|
for parsed_req in parse_requirements(
|
||||||
filename, finder=finder, options=options, session=session
|
source, finder=finder, options=options, session=session
|
||||||
):
|
):
|
||||||
req_to_add = install_req_from_parsed_requirement(
|
req_to_add = install_req_from_parsed_requirement(
|
||||||
parsed_req,
|
parsed_req,
|
||||||
@@ -379,8 +505,17 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
)
|
)
|
||||||
requirements.append(req_to_add)
|
requirements.append(req_to_add)
|
||||||
|
|
||||||
# If any requirement has hash options, enable hash checking.
|
if options.require_hashes and options.no_require_hashes:
|
||||||
if any(req.has_hash_options for req in requirements):
|
raise CommandError(
|
||||||
|
"--require-hashes and --no-require-hashes are mutually exclusive"
|
||||||
|
)
|
||||||
|
|
||||||
|
# If any requirement has hash options, enable hash checking for all
|
||||||
|
# requirements, unless this mechanism has been explicitly disabled
|
||||||
|
# with --no-require-hashes.
|
||||||
|
if not options.no_require_hashes and any(
|
||||||
|
req.has_hash_options for req in requirements
|
||||||
|
):
|
||||||
options.require_hashes = True
|
options.require_hashes = True
|
||||||
|
|
||||||
if not (
|
if not (
|
||||||
@@ -422,7 +557,7 @@ class RequirementCommand(IndexGroupCommand):
|
|||||||
options: Values,
|
options: Values,
|
||||||
session: PipSession,
|
session: PipSession,
|
||||||
target_python: TargetPython | None = None,
|
target_python: TargetPython | None = None,
|
||||||
ignore_requires_python: bool | None = None,
|
ignore_requires_python: bool = False,
|
||||||
) -> PackageFinder:
|
) -> PackageFinder:
|
||||||
"""
|
"""
|
||||||
Create a package finder appropriate to this requirement command.
|
Create a package finder appropriate to this requirement command.
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ UNKNOWN_ERROR = 2
|
|||||||
VIRTUALENV_NOT_FOUND = 3
|
VIRTUALENV_NOT_FOUND = 3
|
||||||
PREVIOUS_BUILD_DIR_ERROR = 4
|
PREVIOUS_BUILD_DIR_ERROR = 4
|
||||||
NO_MATCHES_FOUND = 23
|
NO_MATCHES_FOUND = 23
|
||||||
|
BROKEN_STDOUT = 120
|
||||||
@@ -5,12 +5,17 @@ Package containing all pip commands
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
from collections import namedtuple
|
from typing import TYPE_CHECKING, Any, NamedTuple
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from pip._internal.cli.base_command import Command
|
if TYPE_CHECKING:
|
||||||
|
from pip._internal.cli.base_command import Command
|
||||||
|
|
||||||
|
|
||||||
|
class CommandInfo(NamedTuple):
|
||||||
|
module_path: str
|
||||||
|
class_name: str
|
||||||
|
summary: str
|
||||||
|
|
||||||
CommandInfo = namedtuple("CommandInfo", "module_path, class_name, summary")
|
|
||||||
|
|
||||||
# This dictionary does a bunch of heavy lifting for help output:
|
# This dictionary does a bunch of heavy lifting for help output:
|
||||||
# - Enables avoiding additional (costly) imports for presenting `--help`.
|
# - Enables avoiding additional (costly) imports for presenting `--help`.
|
||||||
@@ -119,7 +124,9 @@ def create_command(name: str, **kwargs: Any) -> Command:
|
|||||||
"""
|
"""
|
||||||
module_path, class_name, summary = commands_dict[name]
|
module_path, class_name, summary = commands_dict[name]
|
||||||
module = importlib.import_module(module_path)
|
module = importlib.import_module(module_path)
|
||||||
command_class = getattr(module, class_name)
|
|
||||||
|
# Registry entries identify Command subclasses by module and class name.
|
||||||
|
command_class: type[Command] = getattr(module, class_name)
|
||||||
command = command_class(name=name, summary=summary, **kwargs)
|
command = command_class(name=name, summary=summary, **kwargs)
|
||||||
|
|
||||||
return command
|
return command
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import textwrap
|
import textwrap
|
||||||
|
from collections.abc import Callable
|
||||||
from optparse import Values
|
from optparse import Values
|
||||||
from typing import Callable
|
|
||||||
|
|
||||||
from pip._internal.cli.base_command import Command
|
from pip._internal.cli.base_command import Command
|
||||||
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
||||||
@@ -107,8 +107,7 @@ class CacheCommand(Command):
|
|||||||
wheels_cache_size = filesystem.format_directory_size(wheels_cache_location)
|
wheels_cache_size = filesystem.format_directory_size(wheels_cache_location)
|
||||||
|
|
||||||
message = (
|
message = (
|
||||||
textwrap.dedent(
|
textwrap.dedent("""
|
||||||
"""
|
|
||||||
Package index page cache location (pip v23.3+): {http_cache_location}
|
Package index page cache location (pip v23.3+): {http_cache_location}
|
||||||
Package index page cache location (older pips): {old_http_cache_location}
|
Package index page cache location (older pips): {old_http_cache_location}
|
||||||
Package index page cache size: {http_cache_size}
|
Package index page cache size: {http_cache_size}
|
||||||
@@ -116,8 +115,7 @@ class CacheCommand(Command):
|
|||||||
Locally built wheels location: {wheels_cache_location}
|
Locally built wheels location: {wheels_cache_location}
|
||||||
Locally built wheels size: {wheels_cache_size}
|
Locally built wheels size: {wheels_cache_size}
|
||||||
Number of locally built wheels: {package_count}
|
Number of locally built wheels: {package_count}
|
||||||
""" # noqa: E501
|
""") # noqa: E501
|
||||||
)
|
|
||||||
.format(
|
.format(
|
||||||
http_cache_location=http_cache_location,
|
http_cache_location=http_cache_location,
|
||||||
old_http_cache_location=old_http_cache_location,
|
old_http_cache_location=old_http_cache_location,
|
||||||
@@ -191,10 +189,13 @@ class CacheCommand(Command):
|
|||||||
logger.verbose("Removed %s", filename)
|
logger.verbose("Removed %s", filename)
|
||||||
|
|
||||||
http_dirs = filesystem.subdirs_without_files(self._cache_dir(options, "http"))
|
http_dirs = filesystem.subdirs_without_files(self._cache_dir(options, "http"))
|
||||||
|
http_v2_dirs = filesystem.subdirs_without_files(
|
||||||
|
self._cache_dir(options, "http-v2")
|
||||||
|
)
|
||||||
wheel_dirs = filesystem.subdirs_without_wheels(
|
wheel_dirs = filesystem.subdirs_without_wheels(
|
||||||
self._cache_dir(options, "wheels")
|
self._cache_dir(options, "wheels")
|
||||||
)
|
)
|
||||||
dirs = [*http_dirs, *wheel_dirs]
|
dirs = [*http_dirs, *http_v2_dirs, *wheel_dirs]
|
||||||
|
|
||||||
for subdir in dirs:
|
for subdir in dirs:
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from collections.abc import Callable
|
||||||
from optparse import Values
|
from optparse import Values
|
||||||
from typing import Any, Callable
|
|
||||||
|
|
||||||
from pip._internal.cli.base_command import Command
|
from pip._internal.cli.base_command import Command
|
||||||
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
||||||
@@ -12,7 +13,6 @@ from pip._internal.configuration import (
|
|||||||
Configuration,
|
Configuration,
|
||||||
Kind,
|
Kind,
|
||||||
get_configuration_files,
|
get_configuration_files,
|
||||||
kinds,
|
|
||||||
)
|
)
|
||||||
from pip._internal.exceptions import PipError
|
from pip._internal.exceptions import PipError
|
||||||
from pip._internal.utils.logging import indent_log
|
from pip._internal.utils.logging import indent_log
|
||||||
@@ -21,6 +21,30 @@ from pip._internal.utils.misc import get_prog, write_output
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def _config_handler(
|
||||||
|
name: str, handler: Callable[..., None]
|
||||||
|
) -> Callable[[Values, list[str]], None]:
|
||||||
|
"""Adapt a configuration action's positional parameters to CLI arguments."""
|
||||||
|
signature = inspect.signature(handler)
|
||||||
|
|
||||||
|
def invoke(options: Values, args: list[str]) -> None:
|
||||||
|
try:
|
||||||
|
signature.bind(options, *args)
|
||||||
|
except TypeError:
|
||||||
|
# Skip options; these action handlers are bound methods.
|
||||||
|
arguments = list(signature.parameters)[1:]
|
||||||
|
example = " ".join([name, *(f"[{argument}]" for argument in arguments)])
|
||||||
|
raise PipError(
|
||||||
|
f"Got unexpected number of arguments, expected {len(arguments)}. "
|
||||||
|
f'(example: "{get_prog()} config {example}")'
|
||||||
|
) from None
|
||||||
|
|
||||||
|
# TypeErrors raised by the action itself are programming errors.
|
||||||
|
handler(options, *args)
|
||||||
|
|
||||||
|
return invoke
|
||||||
|
|
||||||
|
|
||||||
class ConfigurationCommand(Command):
|
class ConfigurationCommand(Command):
|
||||||
"""
|
"""
|
||||||
Manage local and global configuration.
|
Manage local and global configuration.
|
||||||
@@ -96,7 +120,7 @@ class ConfigurationCommand(Command):
|
|||||||
self.parser.insert_option_group(0, self.cmd_opts)
|
self.parser.insert_option_group(0, self.cmd_opts)
|
||||||
|
|
||||||
def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
|
def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
|
||||||
return {
|
handlers: dict[str, Callable[..., None]] = {
|
||||||
"list": self.list_values,
|
"list": self.list_values,
|
||||||
"edit": self.open_in_editor,
|
"edit": self.open_in_editor,
|
||||||
"get": self.get_name,
|
"get": self.get_name,
|
||||||
@@ -105,6 +129,10 @@ class ConfigurationCommand(Command):
|
|||||||
"debug": self.list_config_values,
|
"debug": self.list_config_values,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
name: _config_handler(name, handler) for name, handler in handlers.items()
|
||||||
|
}
|
||||||
|
|
||||||
def run(self, options: Values, args: list[str]) -> int:
|
def run(self, options: Values, args: list[str]) -> int:
|
||||||
handler_map = self.handler_map()
|
handler_map = self.handler_map()
|
||||||
|
|
||||||
@@ -147,9 +175,9 @@ class ConfigurationCommand(Command):
|
|||||||
file_options = [
|
file_options = [
|
||||||
key
|
key
|
||||||
for key, value in (
|
for key, value in (
|
||||||
(kinds.USER, options.user_file),
|
(Kind.USER, options.user_file),
|
||||||
(kinds.GLOBAL, options.global_file),
|
(Kind.GLOBAL, options.global_file),
|
||||||
(kinds.SITE, options.site_file),
|
(Kind.SITE, options.site_file),
|
||||||
)
|
)
|
||||||
if value
|
if value
|
||||||
]
|
]
|
||||||
@@ -160,11 +188,11 @@ class ConfigurationCommand(Command):
|
|||||||
# Default to user, unless there's a site file.
|
# Default to user, unless there's a site file.
|
||||||
elif any(
|
elif any(
|
||||||
os.path.exists(site_config_file)
|
os.path.exists(site_config_file)
|
||||||
for site_config_file in get_configuration_files()[kinds.SITE]
|
for site_config_file in get_configuration_files()[Kind.SITE]
|
||||||
):
|
):
|
||||||
return kinds.SITE
|
return Kind.SITE
|
||||||
else:
|
else:
|
||||||
return kinds.USER
|
return Kind.USER
|
||||||
elif len(file_options) == 1:
|
elif len(file_options) == 1:
|
||||||
return file_options[0]
|
return file_options[0]
|
||||||
|
|
||||||
@@ -173,34 +201,28 @@ class ConfigurationCommand(Command):
|
|||||||
"(--user, --site, --global) to perform."
|
"(--user, --site, --global) to perform."
|
||||||
)
|
)
|
||||||
|
|
||||||
def list_values(self, options: Values, args: list[str]) -> None:
|
def list_values(self, options: Values) -> None:
|
||||||
self._get_n_args(args, "list", n=0)
|
|
||||||
|
|
||||||
for key, value in sorted(self.configuration.items()):
|
for key, value in sorted(self.configuration.items()):
|
||||||
for key, value in sorted(value.items()):
|
for key, value in sorted(value.items()):
|
||||||
write_output("%s=%r", key, value)
|
write_output("%s=%r", key, value)
|
||||||
|
|
||||||
def get_name(self, options: Values, args: list[str]) -> None:
|
def get_name(self, options: Values, name: str) -> None:
|
||||||
key = self._get_n_args(args, "get [name]", n=1)
|
value = self.configuration.get_value(name)
|
||||||
value = self.configuration.get_value(key)
|
|
||||||
|
|
||||||
write_output("%s", value)
|
write_output("%s", value)
|
||||||
|
|
||||||
def set_name_value(self, options: Values, args: list[str]) -> None:
|
def set_name_value(self, options: Values, name: str, value: str) -> None:
|
||||||
key, value = self._get_n_args(args, "set [name] [value]", n=2)
|
self.configuration.set_value(name, value)
|
||||||
self.configuration.set_value(key, value)
|
|
||||||
|
|
||||||
self._save_configuration()
|
self._save_configuration()
|
||||||
|
|
||||||
def unset_name(self, options: Values, args: list[str]) -> None:
|
def unset_name(self, options: Values, name: str) -> None:
|
||||||
key = self._get_n_args(args, "unset [name]", n=1)
|
self.configuration.unset_value(name)
|
||||||
self.configuration.unset_value(key)
|
|
||||||
|
|
||||||
self._save_configuration()
|
self._save_configuration()
|
||||||
|
|
||||||
def list_config_values(self, options: Values, args: list[str]) -> None:
|
def list_config_values(self, options: Values) -> None:
|
||||||
"""List config key-value pairs across different config files"""
|
"""List config key-value pairs across different config files"""
|
||||||
self._get_n_args(args, "debug", n=0)
|
|
||||||
|
|
||||||
self.print_env_var_values()
|
self.print_env_var_values()
|
||||||
# Iterate over config files and print if they exist, and the
|
# Iterate over config files and print if they exist, and the
|
||||||
@@ -230,7 +252,7 @@ class ConfigurationCommand(Command):
|
|||||||
env_var = f"PIP_{key.upper()}"
|
env_var = f"PIP_{key.upper()}"
|
||||||
write_output("%s=%r", env_var, value)
|
write_output("%s=%r", env_var, value)
|
||||||
|
|
||||||
def open_in_editor(self, options: Values, args: list[str]) -> None:
|
def open_in_editor(self, options: Values) -> None:
|
||||||
editor = self._determine_editor(options)
|
editor = self._determine_editor(options)
|
||||||
|
|
||||||
fname = self.configuration.get_file_to_edit()
|
fname = self.configuration.get_file_to_edit()
|
||||||
@@ -252,20 +274,6 @@ class ConfigurationCommand(Command):
|
|||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
raise PipError(f"Editor Subprocess exited with exit code {e.returncode}")
|
raise PipError(f"Editor Subprocess exited with exit code {e.returncode}")
|
||||||
|
|
||||||
def _get_n_args(self, args: list[str], example: str, n: int) -> Any:
|
|
||||||
"""Helper to make sure the command got the right number of arguments"""
|
|
||||||
if len(args) != n:
|
|
||||||
msg = (
|
|
||||||
f"Got unexpected number of arguments, expected {n}. "
|
|
||||||
f'(example: "{get_prog()} config {example}")'
|
|
||||||
)
|
|
||||||
raise PipError(msg)
|
|
||||||
|
|
||||||
if n == 1:
|
|
||||||
return args[0]
|
|
||||||
else:
|
|
||||||
return args
|
|
||||||
|
|
||||||
def _save_configuration(self) -> None:
|
def _save_configuration(self) -> None:
|
||||||
# We successfully ran a modifying command. Need to save the
|
# We successfully ran a modifying command. Need to save the
|
||||||
# configuration.
|
# configuration.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import locale
|
import importlib
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@@ -18,7 +18,7 @@ from pip._internal.cli.cmdoptions import make_target_python
|
|||||||
from pip._internal.cli.status_codes import SUCCESS
|
from pip._internal.cli.status_codes import SUCCESS
|
||||||
from pip._internal.configuration import Configuration
|
from pip._internal.configuration import Configuration
|
||||||
from pip._internal.metadata import get_environment
|
from pip._internal.metadata import get_environment
|
||||||
from pip._internal.utils.compat import open_text_resource
|
from pip._internal.utils.compat import get_locale_encoding, open_text_resource
|
||||||
from pip._internal.utils.logging import indent_log
|
from pip._internal.utils.logging import indent_log
|
||||||
from pip._internal.utils.misc import get_pip_version
|
from pip._internal.utils.misc import get_pip_version
|
||||||
|
|
||||||
@@ -48,29 +48,21 @@ def create_vendor_txt_map() -> dict[str, str]:
|
|||||||
return dict(line.split("==", 1) for line in lines)
|
return dict(line.split("==", 1) for line in lines)
|
||||||
|
|
||||||
|
|
||||||
def get_module_from_module_name(module_name: str) -> ModuleType | None:
|
def get_module_from_module_name(module_name: str) -> ModuleType:
|
||||||
# Module name can be uppercase in vendor.txt for some reason...
|
# Module name can be uppercase in vendor.txt for some reason...
|
||||||
module_name = module_name.lower().replace("-", "_")
|
module_name = module_name.lower().replace("-", "_")
|
||||||
# PATCH: setuptools is actually only pkg_resources.
|
# PATCH: setuptools is actually only pkg_resources.
|
||||||
if module_name == "setuptools":
|
if module_name == "setuptools":
|
||||||
module_name = "pkg_resources"
|
module_name = "pkg_resources"
|
||||||
|
|
||||||
try:
|
return importlib.import_module(f"pip._vendor.{module_name}")
|
||||||
__import__(f"pip._vendor.{module_name}", globals(), locals(), level=0)
|
|
||||||
return getattr(pip._vendor, module_name)
|
|
||||||
except ImportError:
|
|
||||||
# We allow 'truststore' to fail to import due
|
|
||||||
# to being unavailable on Python 3.9 and earlier.
|
|
||||||
if module_name == "truststore" and sys.version_info < (3, 10):
|
|
||||||
return None
|
|
||||||
raise
|
|
||||||
|
|
||||||
|
|
||||||
def get_vendor_version_from_module(module_name: str) -> str | None:
|
def get_vendor_version_from_module(module_name: str) -> str | None:
|
||||||
module = get_module_from_module_name(module_name)
|
module = get_module_from_module_name(module_name)
|
||||||
version = getattr(module, "__version__", None)
|
version = getattr(module, "__version__", None)
|
||||||
|
|
||||||
if module and not version:
|
if not version:
|
||||||
# Try to find version in debundled module info.
|
# Try to find version in debundled module info.
|
||||||
assert module.__file__ is not None
|
assert module.__file__ is not None
|
||||||
env = get_environment([os.path.dirname(module.__file__)])
|
env = get_environment([os.path.dirname(module.__file__)])
|
||||||
@@ -141,7 +133,7 @@ def show_tags(options: Values) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def ca_bundle_info(config: Configuration) -> str:
|
def ca_bundle_info(config: Configuration) -> str:
|
||||||
levels = {key.split(".", 1)[0] for key, _ in config.items()}
|
levels = {key.split(".", 1)[0] for _, options in config.items() for key in options}
|
||||||
if not levels:
|
if not levels:
|
||||||
return "Not specified"
|
return "Not specified"
|
||||||
|
|
||||||
@@ -184,8 +176,8 @@ class DebugCommand(Command):
|
|||||||
show_value("sys.getdefaultencoding", sys.getdefaultencoding())
|
show_value("sys.getdefaultencoding", sys.getdefaultencoding())
|
||||||
show_value("sys.getfilesystemencoding", sys.getfilesystemencoding())
|
show_value("sys.getfilesystemencoding", sys.getfilesystemencoding())
|
||||||
show_value(
|
show_value(
|
||||||
"locale.getpreferredencoding",
|
"locale.getencoding",
|
||||||
locale.getpreferredencoding(),
|
get_locale_encoding(),
|
||||||
)
|
)
|
||||||
show_value("sys.platform", sys.platform)
|
show_value("sys.platform", sys.platform)
|
||||||
show_sys_implementation()
|
show_sys_implementation()
|
||||||
|
|||||||
@@ -39,8 +39,10 @@ class DownloadCommand(RequirementCommand):
|
|||||||
self.cmd_opts.add_option(cmdoptions.requirements())
|
self.cmd_opts.add_option(cmdoptions.requirements())
|
||||||
self.cmd_opts.add_option(cmdoptions.requirements_from_scripts())
|
self.cmd_opts.add_option(cmdoptions.requirements_from_scripts())
|
||||||
self.cmd_opts.add_option(cmdoptions.no_deps())
|
self.cmd_opts.add_option(cmdoptions.no_deps())
|
||||||
|
self.cmd_opts.add_option(cmdoptions.only_deps())
|
||||||
self.cmd_opts.add_option(cmdoptions.src())
|
self.cmd_opts.add_option(cmdoptions.src())
|
||||||
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
||||||
|
self.cmd_opts.add_option(cmdoptions.no_require_hashes())
|
||||||
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
||||||
self.cmd_opts.add_option(cmdoptions.no_build_isolation())
|
self.cmd_opts.add_option(cmdoptions.no_build_isolation())
|
||||||
self.cmd_opts.add_option(cmdoptions.use_pep517())
|
self.cmd_opts.add_option(cmdoptions.use_pep517())
|
||||||
@@ -82,8 +84,9 @@ class DownloadCommand(RequirementCommand):
|
|||||||
options.editables = []
|
options.editables = []
|
||||||
|
|
||||||
cmdoptions.check_dist_restriction(options)
|
cmdoptions.check_dist_restriction(options)
|
||||||
cmdoptions.check_build_constraints(options)
|
self.check_build_constraints(options)
|
||||||
cmdoptions.check_release_control_exclusive(options)
|
cmdoptions.check_release_control_exclusive(options)
|
||||||
|
cmdoptions.check_only_deps_option_does_not_conflict(options)
|
||||||
|
|
||||||
options.download_dir = normalize_path(options.download_dir)
|
options.download_dir = normalize_path(options.download_dir)
|
||||||
ensure_dir(options.download_dir)
|
ensure_dir(options.download_dir)
|
||||||
@@ -117,6 +120,7 @@ class DownloadCommand(RequirementCommand):
|
|||||||
download_dir=options.download_dir,
|
download_dir=options.download_dir,
|
||||||
use_user_site=False,
|
use_user_site=False,
|
||||||
verbosity=self.verbosity,
|
verbosity=self.verbosity,
|
||||||
|
allow_editables=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
resolver = self.make_resolver(
|
resolver = self.make_resolver(
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ from optparse import Values
|
|||||||
from pip._internal.cli import cmdoptions
|
from pip._internal.cli import cmdoptions
|
||||||
from pip._internal.cli.base_command import Command
|
from pip._internal.cli.base_command import Command
|
||||||
from pip._internal.cli.status_codes import SUCCESS
|
from pip._internal.cli.status_codes import SUCCESS
|
||||||
|
from pip._internal.metadata.base import stdlib_pkgs
|
||||||
from pip._internal.operations.freeze import freeze
|
from pip._internal.operations.freeze import freeze
|
||||||
from pip._internal.utils.compat import stdlib_pkgs
|
|
||||||
|
|
||||||
|
|
||||||
def _should_suppress_build_backends() -> bool:
|
def _should_suppress_build_backends() -> bool:
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from collections.abc import Iterable
|
from collections.abc import Callable, Iterable
|
||||||
from optparse import Values
|
from optparse import Values
|
||||||
from typing import Any, Callable
|
from typing import Any
|
||||||
|
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
from pip._vendor.packaging.version import Version
|
from pip._vendor.packaging.version import Version
|
||||||
@@ -16,7 +16,12 @@ from pip._internal.commands.search import (
|
|||||||
get_installed_distribution,
|
get_installed_distribution,
|
||||||
print_dist_installation_info,
|
print_dist_installation_info,
|
||||||
)
|
)
|
||||||
from pip._internal.exceptions import CommandError, DistributionNotFound, PipError
|
from pip._internal.exceptions import (
|
||||||
|
CommandError,
|
||||||
|
DiagnosticPipError,
|
||||||
|
DistributionNotFound,
|
||||||
|
PipError,
|
||||||
|
)
|
||||||
from pip._internal.index.collector import LinkCollector
|
from pip._internal.index.collector import LinkCollector
|
||||||
from pip._internal.index.package_finder import PackageFinder
|
from pip._internal.index.package_finder import PackageFinder
|
||||||
from pip._internal.models.selection_prefs import SelectionPreferences
|
from pip._internal.models.selection_prefs import SelectionPreferences
|
||||||
@@ -80,6 +85,8 @@ class IndexCommand(IndexGroupCommand):
|
|||||||
# Error handling happens here, not in the action-handlers.
|
# Error handling happens here, not in the action-handlers.
|
||||||
try:
|
try:
|
||||||
handler_map[action](options, args[1:])
|
handler_map[action](options, args[1:])
|
||||||
|
except DiagnosticPipError:
|
||||||
|
raise
|
||||||
except PipError as e:
|
except PipError as e:
|
||||||
logger.error(e.args[0])
|
logger.error(e.args[0])
|
||||||
return ERROR
|
return ERROR
|
||||||
@@ -91,7 +98,7 @@ class IndexCommand(IndexGroupCommand):
|
|||||||
options: Values,
|
options: Values,
|
||||||
session: PipSession,
|
session: PipSession,
|
||||||
target_python: TargetPython | None = None,
|
target_python: TargetPython | None = None,
|
||||||
ignore_requires_python: bool | None = None,
|
ignore_requires_python: bool = False,
|
||||||
) -> PackageFinder:
|
) -> PackageFinder:
|
||||||
"""
|
"""
|
||||||
Create a package finder appropriate to the index command.
|
Create a package finder appropriate to the index command.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from pip._internal.cli import cmdoptions
|
|||||||
from pip._internal.cli.base_command import Command
|
from pip._internal.cli.base_command import Command
|
||||||
from pip._internal.cli.status_codes import SUCCESS
|
from pip._internal.cli.status_codes import SUCCESS
|
||||||
from pip._internal.metadata import BaseDistribution, get_environment
|
from pip._internal.metadata import BaseDistribution, get_environment
|
||||||
from pip._internal.utils.compat import stdlib_pkgs
|
from pip._internal.metadata.base import stdlib_pkgs
|
||||||
from pip._internal.utils.urls import path_to_url
|
from pip._internal.utils.urls import path_to_url
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -71,7 +71,7 @@ class InspectCommand(Command):
|
|||||||
# report) since it is not recorded in installed metadata.
|
# report) since it is not recorded in installed metadata.
|
||||||
direct_url = dist.direct_url
|
direct_url = dist.direct_url
|
||||||
if direct_url is not None:
|
if direct_url is not None:
|
||||||
res["direct_url"] = direct_url.to_dict()
|
res["direct_url"] = direct_url.to_dict_compat()
|
||||||
else:
|
else:
|
||||||
# Emulate direct_url for legacy editable installs.
|
# Emulate direct_url for legacy editable installs.
|
||||||
editable_project_location = dist.editable_project_location
|
editable_project_location = dist.editable_project_location
|
||||||
|
|||||||
@@ -1,17 +1,29 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import errno
|
import errno
|
||||||
|
import functools
|
||||||
|
import inspect
|
||||||
import json
|
import json
|
||||||
import operator
|
import operator
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import site
|
import site
|
||||||
|
import sys
|
||||||
|
import traceback
|
||||||
|
import types
|
||||||
|
from collections.abc import Iterable, Iterator, Sequence
|
||||||
from optparse import SUPPRESS_HELP, Values
|
from optparse import SUPPRESS_HELP, Values
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from pip._vendor import pygments, rich
|
||||||
|
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
from pip._vendor.requests.exceptions import InvalidProxyURL
|
from pip._vendor.requests.exceptions import InvalidProxyURL
|
||||||
from pip._vendor.rich import print_json
|
from pip._vendor.rich.text import Text
|
||||||
|
|
||||||
|
import pip
|
||||||
|
|
||||||
# Eagerly import self_outdated_check to avoid crashes. Otherwise,
|
# Eagerly import self_outdated_check to avoid crashes. Otherwise,
|
||||||
# this module would be imported *after* pip was replaced, resulting
|
# this module would be imported *after* pip was replaced, resulting
|
||||||
@@ -19,7 +31,7 @@ from pip._vendor.rich import print_json
|
|||||||
# with the rest of pip that's already imported, or allowing a
|
# with the rest of pip that's already imported, or allowing a
|
||||||
# wheel to execute arbitrary code on install by replacing
|
# wheel to execute arbitrary code on install by replacing
|
||||||
# self_outdated_check.
|
# self_outdated_check.
|
||||||
import pip._internal.self_outdated_check # noqa: F401
|
import pip._internal.self_outdated_check
|
||||||
from pip._internal.cache import WheelCache
|
from pip._internal.cache import WheelCache
|
||||||
from pip._internal.cli import cmdoptions
|
from pip._internal.cli import cmdoptions
|
||||||
from pip._internal.cli.cmdoptions import make_target_python
|
from pip._internal.cli.cmdoptions import make_target_python
|
||||||
@@ -29,6 +41,7 @@ from pip._internal.cli.req_command import (
|
|||||||
)
|
)
|
||||||
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
||||||
from pip._internal.exceptions import (
|
from pip._internal.exceptions import (
|
||||||
|
BlockedImportError,
|
||||||
CommandError,
|
CommandError,
|
||||||
InstallationError,
|
InstallationError,
|
||||||
InstallWheelBuildError,
|
InstallWheelBuildError,
|
||||||
@@ -63,6 +76,242 @@ from pip._internal.wheel_builder import build
|
|||||||
logger = getLogger(__name__)
|
logger = getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
_IMPORT_AUDIT_HOOK_INSTALLED = False
|
||||||
|
_ACTIVE_INSTALLATIONS: set[object] = set()
|
||||||
|
_WARNED_IMPORTS: set[str] = set()
|
||||||
|
_IMPORT_ERRORS: dict[str, ImportError] = {}
|
||||||
|
|
||||||
|
# Import dependencies directly where possible; otherwise list them here.
|
||||||
|
_INTERNAL_EAGER_IMPORTS: tuple[str, ...] = (
|
||||||
|
"pip._internal.operations.install.wheel",
|
||||||
|
# Rich loads the Python lexer when rendering debug tracebacks.
|
||||||
|
f"{pygments.__name__}.lexers.python",
|
||||||
|
# Preload Python 3.13+ traceback helpers to preserve the original error.
|
||||||
|
"traceback",
|
||||||
|
"_colorize",
|
||||||
|
"_suggestions",
|
||||||
|
"ast",
|
||||||
|
"difflib",
|
||||||
|
"unicodedata",
|
||||||
|
# Preserve cmd's fallback when readline is unavailable.
|
||||||
|
"readline",
|
||||||
|
# weakref.finalize imports gc when running shutdown callbacks.
|
||||||
|
"gc",
|
||||||
|
# Requests imports netrc lazily when looking up credentials.
|
||||||
|
"netrc",
|
||||||
|
# Use Rich's actual namespace when pip has been de-vendored.
|
||||||
|
# The renderer is used for output to a legacy Windows console.
|
||||||
|
f"{rich.__name__}._windows_renderer",
|
||||||
|
# zipfile may import these backends when reading compressed wheel contents.
|
||||||
|
"_bz2",
|
||||||
|
"_lzma",
|
||||||
|
"_zstd",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _warn_unsafe_import(module: str) -> None:
|
||||||
|
"""Warn once per module without letting logging block the import."""
|
||||||
|
if module in _WARNED_IMPORTS:
|
||||||
|
return
|
||||||
|
|
||||||
|
# Mark before logging: a handler may itself import this module.
|
||||||
|
_WARNED_IMPORTS.add(module)
|
||||||
|
try:
|
||||||
|
logger.warning(
|
||||||
|
"Unsafe import of %r after pip install completed: packages may have "
|
||||||
|
"changed. Callers should import all required modules before running "
|
||||||
|
"pip install, or run pip in a subprocess. "
|
||||||
|
"See https://pip.pypa.io/en/stable/user_guide/"
|
||||||
|
"#using-pip-from-your-program",
|
||||||
|
module,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
# The caller's logging handlers must not turn warnings into import errors.
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def _prevent_import_hook(name: str, args: tuple[Any, ...]) -> None:
|
||||||
|
if name == "import":
|
||||||
|
_check_import(args[0])
|
||||||
|
|
||||||
|
|
||||||
|
def _check_import(module: str) -> None:
|
||||||
|
"""Apply the installation import policy to audit events and module lookups."""
|
||||||
|
if not _ACTIVE_INSTALLATIONS:
|
||||||
|
_warn_unsafe_import(module)
|
||||||
|
return
|
||||||
|
|
||||||
|
if module in _IMPORT_ERRORS:
|
||||||
|
raise _IMPORT_ERRORS[module].with_traceback(None)
|
||||||
|
|
||||||
|
raise BlockedImportError(
|
||||||
|
f"Blocked import of {module!r} after pip install started. Hook authors"
|
||||||
|
" must import required modules before installation starts."
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class _ImportBlocker:
|
||||||
|
"""Cover module lookups, including reloads, without import audit events."""
|
||||||
|
|
||||||
|
def find_spec(
|
||||||
|
self,
|
||||||
|
fullname: str,
|
||||||
|
path: Sequence[str] | None = None,
|
||||||
|
target: types.ModuleType | None = None,
|
||||||
|
) -> None:
|
||||||
|
_check_import(fullname)
|
||||||
|
|
||||||
|
|
||||||
|
_IMPORT_BLOCKER = _ImportBlocker()
|
||||||
|
|
||||||
|
|
||||||
|
def _eagerly_import_modules(module_names: Iterable[str]) -> None:
|
||||||
|
"""Import selected dependencies before installation starts."""
|
||||||
|
# Load Rich's lazy emoji and width data before installation starts.
|
||||||
|
_ = Text.from_markup(":package:").cell_len
|
||||||
|
|
||||||
|
_IMPORT_ERRORS.clear()
|
||||||
|
for module in dict.fromkeys(module_names):
|
||||||
|
try:
|
||||||
|
__import__(module)
|
||||||
|
except ImportError as error:
|
||||||
|
_IMPORT_ERRORS[module] = error.with_traceback(None)
|
||||||
|
|
||||||
|
|
||||||
|
def _referenced_modules(module: types.ModuleType) -> Iterator[types.ModuleType]:
|
||||||
|
"""Find dependencies referenced by modules and callables."""
|
||||||
|
for value in tuple(vars(module).values()):
|
||||||
|
if isinstance(value, types.ModuleType):
|
||||||
|
yield value
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Standard callable adapters keep dependency globals on their function.
|
||||||
|
while True:
|
||||||
|
if type(value) is functools.partial:
|
||||||
|
value = value.func
|
||||||
|
elif type(value) is types.MethodType:
|
||||||
|
value = value.__func__
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
|
names: tuple[object, ...]
|
||||||
|
if type(value) is types.FunctionType:
|
||||||
|
# Decorators can preserve the original module while changing globals.
|
||||||
|
names = (value.__globals__.get("__name__"), value.__module__)
|
||||||
|
elif callable(value):
|
||||||
|
# Read callable metadata without invoking descriptors.
|
||||||
|
names = (inspect.getattr_static(value, "__module__", None),)
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
|
||||||
|
for name in names:
|
||||||
|
dependency = sys.modules.get(name) if isinstance(name, str) else None
|
||||||
|
if isinstance(dependency, types.ModuleType):
|
||||||
|
yield dependency
|
||||||
|
|
||||||
|
|
||||||
|
def _cache_lazy_import_error(error: ImportError) -> None:
|
||||||
|
"""Preserve failures for both a missing dependency and its failed importers."""
|
||||||
|
# Import machinery removes failed modules before propagating their error.
|
||||||
|
for frame, _ in traceback.walk_tb(error.__traceback__):
|
||||||
|
module_name = frame.f_globals.get("__name__")
|
||||||
|
if isinstance(module_name, str) and module_name not in sys.modules:
|
||||||
|
_IMPORT_ERRORS[module_name] = error
|
||||||
|
|
||||||
|
if error.name is not None:
|
||||||
|
_IMPORT_ERRORS[error.name] = error
|
||||||
|
|
||||||
|
# Avoid retaining the import traceback in the cache.
|
||||||
|
error.with_traceback(None)
|
||||||
|
|
||||||
|
|
||||||
|
def _reify_lazy_imports(module_names: Iterable[str]) -> None:
|
||||||
|
"""Resolve lazy bindings in installation dependencies before imports are blocked."""
|
||||||
|
if sys.version_info < (3, 15):
|
||||||
|
return
|
||||||
|
|
||||||
|
modules = {
|
||||||
|
name: module
|
||||||
|
for name in module_names
|
||||||
|
if isinstance(module := sys.modules.get(name), types.ModuleType)
|
||||||
|
}
|
||||||
|
attempted: set[object] = set()
|
||||||
|
|
||||||
|
while True:
|
||||||
|
# A from-import can already hold an object from a lazy dependency.
|
||||||
|
dependencies = {
|
||||||
|
dependency.__name__: dependency
|
||||||
|
for module in modules.values()
|
||||||
|
for dependency in _referenced_modules(module)
|
||||||
|
if dependency.__name__ not in modules
|
||||||
|
}
|
||||||
|
modules.update(dependencies)
|
||||||
|
|
||||||
|
# Resolving a binding can add lazy imports to modules already scanned.
|
||||||
|
pending = [
|
||||||
|
(module, name, value)
|
||||||
|
for module in modules.values()
|
||||||
|
for name, value in tuple(vars(module).items())
|
||||||
|
if type(value) is types.LazyImportType and value not in attempted
|
||||||
|
]
|
||||||
|
if not pending and not dependencies:
|
||||||
|
break
|
||||||
|
|
||||||
|
for module, name, value in pending:
|
||||||
|
attempted.add(value)
|
||||||
|
before = set(sys.modules)
|
||||||
|
|
||||||
|
try:
|
||||||
|
resolved = getattr(module, name)
|
||||||
|
|
||||||
|
# The binding may resolve to an already-loaded module.
|
||||||
|
if isinstance(resolved, types.ModuleType):
|
||||||
|
modules[resolved.__name__] = resolved
|
||||||
|
except ImportError as error:
|
||||||
|
_cache_lazy_import_error(error)
|
||||||
|
except Exception:
|
||||||
|
# Optional lazy imports need not succeed for installation to proceed.
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Include dependencies loaded indirectly, even by a failed import.
|
||||||
|
for dependency in sys.modules.keys() - before:
|
||||||
|
imported = sys.modules[dependency]
|
||||||
|
if isinstance(imported, types.ModuleType):
|
||||||
|
modules[dependency] = imported
|
||||||
|
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def _prevent_further_imports(*, until_process_exit: bool = False) -> Iterator[None]:
|
||||||
|
"""Block late imports until process exit or control returns to a caller."""
|
||||||
|
global _IMPORT_AUDIT_HOOK_INSTALLED
|
||||||
|
if not _IMPORT_AUDIT_HOOK_INSTALLED:
|
||||||
|
sys.addaudithook(_prevent_import_hook)
|
||||||
|
_IMPORT_AUDIT_HOOK_INSTALLED = True
|
||||||
|
|
||||||
|
# Callers may add finders between installations; reloads bypass audit events.
|
||||||
|
sys.meta_path[:] = [
|
||||||
|
_IMPORT_BLOCKER,
|
||||||
|
*(finder for finder in sys.meta_path if finder is not _IMPORT_BLOCKER),
|
||||||
|
]
|
||||||
|
|
||||||
|
token = object()
|
||||||
|
_ACTIVE_INSTALLATIONS.add(token)
|
||||||
|
try:
|
||||||
|
yield
|
||||||
|
finally:
|
||||||
|
# CLI exception hooks and exit callbacks run after command cleanup.
|
||||||
|
if not until_process_exit:
|
||||||
|
_ACTIVE_INSTALLATIONS.discard(token)
|
||||||
|
|
||||||
|
|
||||||
|
def _arg_refers_to_pip(arg: str) -> bool:
|
||||||
|
try:
|
||||||
|
req = Requirement(arg)
|
||||||
|
except InvalidRequirement:
|
||||||
|
return False
|
||||||
|
return canonicalize_name(req.name) == "pip"
|
||||||
|
|
||||||
|
|
||||||
class InstallCommand(RequirementCommand):
|
class InstallCommand(RequirementCommand):
|
||||||
"""
|
"""
|
||||||
Install packages from:
|
Install packages from:
|
||||||
@@ -83,12 +332,18 @@ class InstallCommand(RequirementCommand):
|
|||||||
%prog [options] [-e] <local project path> ...
|
%prog [options] [-e] <local project path> ...
|
||||||
%prog [options] <archive url/path> ..."""
|
%prog [options] <archive url/path> ..."""
|
||||||
|
|
||||||
|
def main(self, args: list[str]) -> int:
|
||||||
|
# Keep imports blocked through command cleanup and logging shutdown.
|
||||||
|
with contextlib.ExitStack() as self._import_guard:
|
||||||
|
return super().main(args)
|
||||||
|
|
||||||
def add_options(self) -> None:
|
def add_options(self) -> None:
|
||||||
self.cmd_opts.add_option(cmdoptions.requirements())
|
self.cmd_opts.add_option(cmdoptions.requirements())
|
||||||
self.cmd_opts.add_option(cmdoptions.constraints())
|
self.cmd_opts.add_option(cmdoptions.constraints())
|
||||||
self.cmd_opts.add_option(cmdoptions.build_constraints())
|
self.cmd_opts.add_option(cmdoptions.build_constraints())
|
||||||
self.cmd_opts.add_option(cmdoptions.requirements_from_scripts())
|
self.cmd_opts.add_option(cmdoptions.requirements_from_scripts())
|
||||||
self.cmd_opts.add_option(cmdoptions.no_deps())
|
self.cmd_opts.add_option(cmdoptions.no_deps())
|
||||||
|
self.cmd_opts.add_option(cmdoptions.only_deps())
|
||||||
|
|
||||||
self.cmd_opts.add_option(cmdoptions.editable())
|
self.cmd_opts.add_option(cmdoptions.editable())
|
||||||
self.cmd_opts.add_option(
|
self.cmd_opts.add_option(
|
||||||
@@ -245,6 +500,7 @@ class InstallCommand(RequirementCommand):
|
|||||||
help="Do not warn about broken dependencies",
|
help="Do not warn about broken dependencies",
|
||||||
)
|
)
|
||||||
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
||||||
|
self.cmd_opts.add_option(cmdoptions.no_require_hashes())
|
||||||
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
||||||
self.cmd_opts.add_option(cmdoptions.root_user_action())
|
self.cmd_opts.add_option(cmdoptions.root_user_action())
|
||||||
|
|
||||||
@@ -278,6 +534,17 @@ class InstallCommand(RequirementCommand):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def pip_version_check(self, options: Values, args: list[str]) -> Iterator[None]:
|
||||||
|
# Skip the self-version check when pip itself is a requirement. The
|
||||||
|
# running pip may be replaced mid-command, and the upgrade prompt
|
||||||
|
# is redundant.
|
||||||
|
if any(_arg_refers_to_pip(arg) for arg in args):
|
||||||
|
yield
|
||||||
|
return
|
||||||
|
with super().pip_version_check(options, args):
|
||||||
|
yield
|
||||||
|
|
||||||
@with_cleanup
|
@with_cleanup
|
||||||
def run(self, options: Values, args: list[str]) -> int:
|
def run(self, options: Values, args: list[str]) -> int:
|
||||||
if options.use_user_site and options.target_dir is not None:
|
if options.use_user_site and options.target_dir is not None:
|
||||||
@@ -304,7 +571,8 @@ class InstallCommand(RequirementCommand):
|
|||||||
if options.upgrade:
|
if options.upgrade:
|
||||||
upgrade_strategy = options.upgrade_strategy
|
upgrade_strategy = options.upgrade_strategy
|
||||||
|
|
||||||
cmdoptions.check_build_constraints(options)
|
cmdoptions.check_only_deps_option_does_not_conflict(options)
|
||||||
|
self.check_build_constraints(options)
|
||||||
cmdoptions.check_dist_restriction(options, check_target=True)
|
cmdoptions.check_dist_restriction(options, check_target=True)
|
||||||
cmdoptions.check_release_control_exclusive(options)
|
cmdoptions.check_release_control_exclusive(options)
|
||||||
|
|
||||||
@@ -359,12 +627,6 @@ class InstallCommand(RequirementCommand):
|
|||||||
|
|
||||||
wheel_cache = WheelCache(options.cache_dir)
|
wheel_cache = WheelCache(options.cache_dir)
|
||||||
|
|
||||||
# Only when installing is it permitted to use PEP 660.
|
|
||||||
# In other circumstances (pip wheel, pip download) we generate
|
|
||||||
# regular (i.e. non editable) metadata and wheels.
|
|
||||||
for req in reqs:
|
|
||||||
req.permit_editable_wheels = True
|
|
||||||
|
|
||||||
preparer = self.make_requirement_preparer(
|
preparer = self.make_requirement_preparer(
|
||||||
temp_build_dir=directory,
|
temp_build_dir=directory,
|
||||||
options=options,
|
options=options,
|
||||||
@@ -373,6 +635,7 @@ class InstallCommand(RequirementCommand):
|
|||||||
finder=finder,
|
finder=finder,
|
||||||
use_user_site=options.use_user_site,
|
use_user_site=options.use_user_site,
|
||||||
verbosity=self.verbosity,
|
verbosity=self.verbosity,
|
||||||
|
allow_editables=True,
|
||||||
)
|
)
|
||||||
resolver = self.make_resolver(
|
resolver = self.make_resolver(
|
||||||
preparer=preparer,
|
preparer=preparer,
|
||||||
@@ -396,7 +659,7 @@ class InstallCommand(RequirementCommand):
|
|||||||
if options.json_report_file:
|
if options.json_report_file:
|
||||||
report = InstallationReport(requirement_set.requirements_to_install)
|
report = InstallationReport(requirement_set.requirements_to_install)
|
||||||
if options.json_report_file == "-":
|
if options.json_report_file == "-":
|
||||||
print_json(data=report.to_dict())
|
rich.print_json(data=report.to_dict())
|
||||||
else:
|
else:
|
||||||
with open(options.json_report_file, "w", encoding="utf-8") as f:
|
with open(options.json_report_file, "w", encoding="utf-8") as f:
|
||||||
json.dump(report.to_dict(), f, indent=2, ensure_ascii=False)
|
json.dump(report.to_dict(), f, indent=2, ensure_ascii=False)
|
||||||
@@ -438,6 +701,7 @@ class InstallCommand(RequirementCommand):
|
|||||||
reqs_to_build,
|
reqs_to_build,
|
||||||
wheel_cache=wheel_cache,
|
wheel_cache=wheel_cache,
|
||||||
verify=True,
|
verify=True,
|
||||||
|
allow_editables=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
if build_failures:
|
if build_failures:
|
||||||
@@ -459,6 +723,15 @@ class InstallCommand(RequirementCommand):
|
|||||||
if options.target_dir or options.prefix_path:
|
if options.target_dir or options.prefix_path:
|
||||||
warn_script_location = False
|
warn_script_location = False
|
||||||
|
|
||||||
|
# Block late imports so we don't silently pick up a module
|
||||||
|
# from a distribution pip is about to install.
|
||||||
|
module_names = (*_INTERNAL_EAGER_IMPORTS, *pip._EAGER_IMPORTS)
|
||||||
|
_eagerly_import_modules(module_names)
|
||||||
|
_reify_lazy_imports(module_names)
|
||||||
|
self._import_guard.enter_context(
|
||||||
|
_prevent_further_imports(until_process_exit=self._cli)
|
||||||
|
)
|
||||||
|
|
||||||
installed = install_given_reqs(
|
installed = install_given_reqs(
|
||||||
to_install,
|
to_install,
|
||||||
root=options.root_path,
|
root=options.root_path,
|
||||||
@@ -503,8 +776,10 @@ class InstallCommand(RequirementCommand):
|
|||||||
self._handle_target_dir(
|
self._handle_target_dir(
|
||||||
options.target_dir, target_temp_dir, options.upgrade
|
options.target_dir, target_temp_dir, options.upgrade
|
||||||
)
|
)
|
||||||
|
|
||||||
if options.root_user_action == "warn":
|
if options.root_user_action == "warn":
|
||||||
warn_if_run_as_root()
|
warn_if_run_as_root()
|
||||||
|
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
|
|
||||||
def _handle_target_dir(
|
def _handle_target_dir(
|
||||||
@@ -512,8 +787,6 @@ class InstallCommand(RequirementCommand):
|
|||||||
) -> None:
|
) -> None:
|
||||||
ensure_dir(target_dir)
|
ensure_dir(target_dir)
|
||||||
|
|
||||||
# Checking both purelib and platlib directories for installed
|
|
||||||
# packages to be moved to target directory
|
|
||||||
lib_dir_list = []
|
lib_dir_list = []
|
||||||
|
|
||||||
# Checking both purelib and platlib directories for installed
|
# Checking both purelib and platlib directories for installed
|
||||||
@@ -532,12 +805,16 @@ class InstallCommand(RequirementCommand):
|
|||||||
|
|
||||||
for lib_dir in lib_dir_list:
|
for lib_dir in lib_dir_list:
|
||||||
for item in os.listdir(lib_dir):
|
for item in os.listdir(lib_dir):
|
||||||
|
# Do not move library directories a second time as data.
|
||||||
if lib_dir == data_dir:
|
if lib_dir == data_dir:
|
||||||
ddir = os.path.join(data_dir, item)
|
ddir = os.path.join(data_dir, item)
|
||||||
if any(s.startswith(ddir) for s in lib_dir_list[:-1]):
|
if any(s.startswith(ddir) for s in lib_dir_list[:-1]):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
target_item_dir = os.path.join(target_dir, item)
|
target_item_dir = os.path.join(target_dir, item)
|
||||||
if os.path.exists(target_item_dir):
|
|
||||||
|
# Keep dangling links subject to the same replacement policy.
|
||||||
|
if os.path.lexists(target_item_dir):
|
||||||
if not upgrade:
|
if not upgrade:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Target directory %s already exists. Specify "
|
"Target directory %s already exists. Specify "
|
||||||
@@ -545,6 +822,7 @@ class InstallCommand(RequirementCommand):
|
|||||||
target_item_dir,
|
target_item_dir,
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if os.path.islink(target_item_dir):
|
if os.path.islink(target_item_dir):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Target directory %s already exists and is "
|
"Target directory %s already exists and is "
|
||||||
@@ -554,6 +832,7 @@ class InstallCommand(RequirementCommand):
|
|||||||
target_item_dir,
|
target_item_dir,
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if os.path.isdir(target_item_dir):
|
if os.path.isdir(target_item_dir):
|
||||||
shutil.rmtree(target_item_dir)
|
shutil.rmtree(target_item_dir)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from collections.abc import Generator, Sequence
|
from collections.abc import Generator, Iterator, Sequence
|
||||||
from email.parser import Parser
|
from email.parser import Parser
|
||||||
from optparse import Values
|
from optparse import Values
|
||||||
from typing import TYPE_CHECKING, cast
|
from typing import TYPE_CHECKING, cast
|
||||||
@@ -15,8 +16,8 @@ from pip._internal.cli.index_command import IndexGroupCommand
|
|||||||
from pip._internal.cli.status_codes import SUCCESS
|
from pip._internal.cli.status_codes import SUCCESS
|
||||||
from pip._internal.exceptions import CommandError
|
from pip._internal.exceptions import CommandError
|
||||||
from pip._internal.metadata import BaseDistribution, get_environment
|
from pip._internal.metadata import BaseDistribution, get_environment
|
||||||
|
from pip._internal.metadata.base import stdlib_pkgs
|
||||||
from pip._internal.models.selection_prefs import SelectionPreferences
|
from pip._internal.models.selection_prefs import SelectionPreferences
|
||||||
from pip._internal.utils.compat import stdlib_pkgs
|
|
||||||
from pip._internal.utils.misc import tabulate, write_output
|
from pip._internal.utils.misc import tabulate, write_output
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
@@ -135,9 +136,13 @@ class ListCommand(IndexGroupCommand):
|
|||||||
self.parser.insert_option_group(0, selection_opts)
|
self.parser.insert_option_group(0, selection_opts)
|
||||||
self.parser.insert_option_group(0, self.cmd_opts)
|
self.parser.insert_option_group(0, self.cmd_opts)
|
||||||
|
|
||||||
def handle_pip_version_check(self, options: Values) -> None:
|
@contextlib.contextmanager
|
||||||
if options.outdated or options.uptodate:
|
def pip_version_check(self, options: Values, args: list[str]) -> Iterator[None]:
|
||||||
super().handle_pip_version_check(options)
|
if not (options.outdated or options.uptodate):
|
||||||
|
yield
|
||||||
|
return
|
||||||
|
with super().pip_version_check(options, args):
|
||||||
|
yield
|
||||||
|
|
||||||
def _build_package_finder(
|
def _build_package_finder(
|
||||||
self, options: Values, session: PipSession
|
self, options: Values, session: PipSession
|
||||||
@@ -155,11 +160,14 @@ class ListCommand(IndexGroupCommand):
|
|||||||
selection_prefs = SelectionPreferences(
|
selection_prefs = SelectionPreferences(
|
||||||
allow_yanked=False,
|
allow_yanked=False,
|
||||||
release_control=options.release_control,
|
release_control=options.release_control,
|
||||||
|
format_control=options.format_control,
|
||||||
|
prefer_binary=options.prefer_binary,
|
||||||
)
|
)
|
||||||
|
|
||||||
return PackageFinder.create(
|
return PackageFinder.create(
|
||||||
link_collector=link_collector,
|
link_collector=link_collector,
|
||||||
selection_prefs=selection_prefs,
|
selection_prefs=selection_prefs,
|
||||||
|
uploaded_prior_to=options.uploaded_prior_to,
|
||||||
)
|
)
|
||||||
|
|
||||||
def run(self, options: Values, args: list[str]) -> int:
|
def run(self, options: Values, args: list[str]) -> int:
|
||||||
@@ -175,10 +183,6 @@ class ListCommand(IndexGroupCommand):
|
|||||||
|
|
||||||
cmdoptions.check_list_path_option(options)
|
cmdoptions.check_list_path_option(options)
|
||||||
|
|
||||||
skip = set(stdlib_pkgs)
|
|
||||||
if options.excludes:
|
|
||||||
skip.update(canonicalize_name(n) for n in options.excludes)
|
|
||||||
|
|
||||||
packages: _ProcessedDists = [
|
packages: _ProcessedDists = [
|
||||||
cast("_DistWithLatestInfo", d)
|
cast("_DistWithLatestInfo", d)
|
||||||
for d in get_environment(options.path).iter_installed_distributions(
|
for d in get_environment(options.path).iter_installed_distributions(
|
||||||
@@ -186,7 +190,7 @@ class ListCommand(IndexGroupCommand):
|
|||||||
user_only=options.user,
|
user_only=options.user,
|
||||||
editables_only=options.editable,
|
editables_only=options.editable,
|
||||||
include_editables=options.include_editable,
|
include_editables=options.include_editable,
|
||||||
skip=skip,
|
skip=set(stdlib_pkgs),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -197,6 +201,12 @@ class ListCommand(IndexGroupCommand):
|
|||||||
if options.not_required:
|
if options.not_required:
|
||||||
packages = self.get_not_required(packages, options)
|
packages = self.get_not_required(packages, options)
|
||||||
|
|
||||||
|
if options.excludes:
|
||||||
|
excluded_names = {canonicalize_name(n) for n in options.excludes}
|
||||||
|
packages = [
|
||||||
|
dist for dist in packages if dist.canonical_name not in excluded_names
|
||||||
|
]
|
||||||
|
|
||||||
if options.outdated:
|
if options.outdated:
|
||||||
packages = self.get_outdated(packages, options)
|
packages = self.get_outdated(packages, options)
|
||||||
elif options.uptodate:
|
elif options.uptodate:
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class LockCommand(RequirementCommand):
|
|||||||
self.cmd_opts.add_option(cmdoptions.constraints())
|
self.cmd_opts.add_option(cmdoptions.constraints())
|
||||||
self.cmd_opts.add_option(cmdoptions.build_constraints())
|
self.cmd_opts.add_option(cmdoptions.build_constraints())
|
||||||
self.cmd_opts.add_option(cmdoptions.no_deps())
|
self.cmd_opts.add_option(cmdoptions.no_deps())
|
||||||
|
self.cmd_opts.add_option(cmdoptions.only_deps())
|
||||||
|
|
||||||
self.cmd_opts.add_option(cmdoptions.editable())
|
self.cmd_opts.add_option(cmdoptions.editable())
|
||||||
|
|
||||||
@@ -75,6 +76,7 @@ class LockCommand(RequirementCommand):
|
|||||||
self.cmd_opts.add_option(cmdoptions.config_settings())
|
self.cmd_opts.add_option(cmdoptions.config_settings())
|
||||||
|
|
||||||
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
||||||
|
self.cmd_opts.add_option(cmdoptions.no_require_hashes())
|
||||||
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
||||||
|
|
||||||
index_opts = cmdoptions.make_option_group(
|
index_opts = cmdoptions.make_option_group(
|
||||||
@@ -101,8 +103,9 @@ class LockCommand(RequirementCommand):
|
|||||||
"without prior warning."
|
"without prior warning."
|
||||||
)
|
)
|
||||||
|
|
||||||
cmdoptions.check_build_constraints(options)
|
self.check_build_constraints(options)
|
||||||
cmdoptions.check_release_control_exclusive(options)
|
cmdoptions.check_release_control_exclusive(options)
|
||||||
|
cmdoptions.check_only_deps_option_does_not_conflict(options)
|
||||||
|
|
||||||
session = self.get_default_session(options)
|
session = self.get_default_session(options)
|
||||||
|
|
||||||
@@ -123,12 +126,6 @@ class LockCommand(RequirementCommand):
|
|||||||
|
|
||||||
wheel_cache = WheelCache(options.cache_dir)
|
wheel_cache = WheelCache(options.cache_dir)
|
||||||
|
|
||||||
# Only when installing is it permitted to use PEP 660.
|
|
||||||
# In other circumstances (pip wheel, pip download) we generate
|
|
||||||
# regular (i.e. non editable) metadata and wheels.
|
|
||||||
for req in reqs:
|
|
||||||
req.permit_editable_wheels = True
|
|
||||||
|
|
||||||
preparer = self.make_requirement_preparer(
|
preparer = self.make_requirement_preparer(
|
||||||
temp_build_dir=directory,
|
temp_build_dir=directory,
|
||||||
options=options,
|
options=options,
|
||||||
@@ -137,6 +134,7 @@ class LockCommand(RequirementCommand):
|
|||||||
finder=finder,
|
finder=finder,
|
||||||
use_user_site=False,
|
use_user_site=False,
|
||||||
verbosity=self.verbosity,
|
verbosity=self.verbosity,
|
||||||
|
allow_editables=True,
|
||||||
)
|
)
|
||||||
resolver = self.make_resolver(
|
resolver = self.make_resolver(
|
||||||
preparer=preparer,
|
preparer=preparer,
|
||||||
|
|||||||
@@ -116,18 +116,14 @@ def transform_hits(hits: list[dict[str, str]]) -> list[TransformedHit]:
|
|||||||
def print_dist_installation_info(latest: str, dist: BaseDistribution | None) -> None:
|
def print_dist_installation_info(latest: str, dist: BaseDistribution | None) -> None:
|
||||||
if dist is not None:
|
if dist is not None:
|
||||||
with indent_log():
|
with indent_log():
|
||||||
if dist.version == latest:
|
write_output("INSTALLED: %s", dist.version)
|
||||||
write_output("INSTALLED: %s (latest)", dist.version)
|
if parse_version(latest).pre:
|
||||||
|
write_output(
|
||||||
|
"LATEST: %s (pre-release; install with `pip install --pre`)",
|
||||||
|
latest,
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
write_output("INSTALLED: %s", dist.version)
|
write_output("LATEST: %s", latest)
|
||||||
if parse_version(latest).pre:
|
|
||||||
write_output(
|
|
||||||
"LATEST: %s (pre-release; install"
|
|
||||||
" with `pip install --pre`)",
|
|
||||||
latest,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
write_output("LATEST: %s", latest)
|
|
||||||
|
|
||||||
|
|
||||||
def get_installed_distribution(name: str) -> BaseDistribution | None:
|
def get_installed_distribution(name: str) -> BaseDistribution | None:
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class ShowCommand(Command):
|
|||||||
return ERROR
|
return ERROR
|
||||||
query = args
|
query = args
|
||||||
|
|
||||||
results = search_packages_info(query)
|
results = search_packages_info(query, include_files=options.files)
|
||||||
if not print_results(
|
if not print_results(
|
||||||
results, list_files=options.files, verbose=options.verbose
|
results, list_files=options.files, verbose=options.verbose
|
||||||
):
|
):
|
||||||
@@ -82,7 +82,10 @@ class _PackageInfo(NamedTuple):
|
|||||||
files: list[str] | None
|
files: list[str] | None
|
||||||
|
|
||||||
|
|
||||||
def search_packages_info(query: list[str]) -> Generator[_PackageInfo, None, None]:
|
def search_packages_info(
|
||||||
|
query: list[str],
|
||||||
|
include_files: bool,
|
||||||
|
) -> Generator[_PackageInfo, None, None]:
|
||||||
"""
|
"""
|
||||||
Gather details from installed distributions. Print distribution name,
|
Gather details from installed distributions. Print distribution name,
|
||||||
version, location, and installed files. Installed files requires a
|
version, location, and installed files. Installed files requires a
|
||||||
@@ -133,11 +136,11 @@ def search_packages_info(query: list[str]) -> Generator[_PackageInfo, None, None
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
entry_points = []
|
entry_points = []
|
||||||
|
|
||||||
files_iter = dist.iter_declared_entries()
|
files: list[str] | None = None
|
||||||
if files_iter is None:
|
if include_files:
|
||||||
files: list[str] | None = None
|
files_iter = dist.iter_declared_entries()
|
||||||
else:
|
if files_iter is not None:
|
||||||
files = sorted(files_iter)
|
files = sorted(files_iter)
|
||||||
|
|
||||||
metadata = dist.metadata
|
metadata = dist.metadata
|
||||||
|
|
||||||
@@ -189,7 +192,10 @@ def print_results(
|
|||||||
if i > 0:
|
if i > 0:
|
||||||
write_output("---")
|
write_output("---")
|
||||||
|
|
||||||
metadata_version_tuple = tuple(map(int, dist.metadata_version.split(".")))
|
metadata_version = dist.metadata_version
|
||||||
|
metadata_version_tuple = (
|
||||||
|
tuple(map(int, metadata_version.split("."))) if metadata_version else ()
|
||||||
|
)
|
||||||
|
|
||||||
write_output("Name: %s", dist.name)
|
write_output("Name: %s", dist.name)
|
||||||
write_output("Version: %s", dist.version)
|
write_output("Version: %s", dist.version)
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class WheelCommand(RequirementCommand):
|
|||||||
self.cmd_opts.add_option(cmdoptions.src())
|
self.cmd_opts.add_option(cmdoptions.src())
|
||||||
self.cmd_opts.add_option(cmdoptions.ignore_requires_python())
|
self.cmd_opts.add_option(cmdoptions.ignore_requires_python())
|
||||||
self.cmd_opts.add_option(cmdoptions.no_deps())
|
self.cmd_opts.add_option(cmdoptions.no_deps())
|
||||||
|
self.cmd_opts.add_option(cmdoptions.only_deps())
|
||||||
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
||||||
|
|
||||||
self.cmd_opts.add_option(
|
self.cmd_opts.add_option(
|
||||||
@@ -75,6 +76,7 @@ class WheelCommand(RequirementCommand):
|
|||||||
self.cmd_opts.add_option(cmdoptions.config_settings())
|
self.cmd_opts.add_option(cmdoptions.config_settings())
|
||||||
|
|
||||||
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
||||||
|
self.cmd_opts.add_option(cmdoptions.no_require_hashes())
|
||||||
|
|
||||||
index_opts = cmdoptions.make_option_group(
|
index_opts = cmdoptions.make_option_group(
|
||||||
cmdoptions.index_group,
|
cmdoptions.index_group,
|
||||||
@@ -92,8 +94,9 @@ class WheelCommand(RequirementCommand):
|
|||||||
|
|
||||||
@with_cleanup
|
@with_cleanup
|
||||||
def run(self, options: Values, args: list[str]) -> int:
|
def run(self, options: Values, args: list[str]) -> int:
|
||||||
cmdoptions.check_build_constraints(options)
|
self.check_build_constraints(options)
|
||||||
cmdoptions.check_release_control_exclusive(options)
|
cmdoptions.check_release_control_exclusive(options)
|
||||||
|
cmdoptions.check_only_deps_option_does_not_conflict(options)
|
||||||
|
|
||||||
session = self.get_default_session(options)
|
session = self.get_default_session(options)
|
||||||
|
|
||||||
@@ -123,6 +126,7 @@ class WheelCommand(RequirementCommand):
|
|||||||
download_dir=options.wheel_dir,
|
download_dir=options.wheel_dir,
|
||||||
use_user_site=False,
|
use_user_site=False,
|
||||||
verbosity=self.verbosity,
|
verbosity=self.verbosity,
|
||||||
|
allow_editables=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
resolver = self.make_resolver(
|
resolver = self.make_resolver(
|
||||||
@@ -151,6 +155,7 @@ class WheelCommand(RequirementCommand):
|
|||||||
reqs_to_build,
|
reqs_to_build,
|
||||||
wheel_cache=wheel_cache,
|
wheel_cache=wheel_cache,
|
||||||
verify=(not options.no_verify),
|
verify=(not options.no_verify),
|
||||||
|
allow_editables=False,
|
||||||
)
|
)
|
||||||
for req in build_successes:
|
for req in build_successes:
|
||||||
assert req.link and req.link.is_wheel
|
assert req.link and req.link.is_wheel
|
||||||
@@ -160,8 +165,9 @@ class WheelCommand(RequirementCommand):
|
|||||||
shutil.copy(req.local_file_path, options.wheel_dir)
|
shutil.copy(req.local_file_path, options.wheel_dir)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Building wheel for %s failed: %s",
|
"Failed to copy built wheel %s to %s: %s",
|
||||||
req.name,
|
req.name,
|
||||||
|
options.wheel_dir,
|
||||||
e,
|
e,
|
||||||
)
|
)
|
||||||
build_failures.append(req)
|
build_failures.append(req)
|
||||||
|
|||||||
@@ -14,37 +14,44 @@ Some terminology:
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import configparser
|
import configparser
|
||||||
import locale
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
from typing import Any, NewType
|
from enum import Enum
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from pip._internal.exceptions import (
|
from pip._internal.exceptions import (
|
||||||
ConfigurationError,
|
ConfigurationError,
|
||||||
ConfigurationFileCouldNotBeLoaded,
|
ConfigurationFileCouldNotBeLoaded,
|
||||||
)
|
)
|
||||||
from pip._internal.utils import appdirs
|
from pip._internal.utils import appdirs
|
||||||
from pip._internal.utils.compat import WINDOWS
|
from pip._internal.utils._log import getLogger
|
||||||
from pip._internal.utils.logging import getLogger
|
from pip._internal.utils.compat import WINDOWS, get_locale_encoding
|
||||||
from pip._internal.utils.misc import ensure_dir, enum
|
from pip._internal.utils.misc import ensure_dir
|
||||||
|
|
||||||
RawConfigParser = configparser.RawConfigParser # Shorthand
|
RawConfigParser = configparser.RawConfigParser # Shorthand
|
||||||
Kind = NewType("Kind", str)
|
|
||||||
|
|
||||||
CONFIG_BASENAME = "pip.ini" if WINDOWS else "pip.conf"
|
CONFIG_BASENAME = "pip.ini" if WINDOWS else "pip.conf"
|
||||||
ENV_NAMES_IGNORED = "version", "help"
|
ENV_NAMES_IGNORED = "version", "help"
|
||||||
|
|
||||||
|
|
||||||
# The kinds of configurations there are.
|
# The kinds of configurations there are.
|
||||||
kinds = enum(
|
# TODO: Use StrEnum when Python 3.10 support is dropped.
|
||||||
USER="user", # User Specific
|
class Kind(str, Enum):
|
||||||
GLOBAL="global", # System Wide
|
"""Configuration sources, including files and environment variables."""
|
||||||
SITE="site", # [Virtual] Environment Specific
|
|
||||||
ENV="env", # from PIP_CONFIG_FILE
|
USER = "user" # User Specific
|
||||||
ENV_VAR="env-var", # from Environment Variables
|
GLOBAL = "global" # System Wide
|
||||||
)
|
SITE = "site" # [Virtual] Environment Specific
|
||||||
OVERRIDE_ORDER = kinds.GLOBAL, kinds.USER, kinds.SITE, kinds.ENV, kinds.ENV_VAR
|
ENV = "env" # from PIP_CONFIG_FILE
|
||||||
VALID_LOAD_ONLY = kinds.USER, kinds.GLOBAL, kinds.SITE
|
ENV_VAR = "env-var" # from Environment Variables
|
||||||
|
|
||||||
|
__str__ = str.__str__
|
||||||
|
__repr__ = str.__repr__
|
||||||
|
|
||||||
|
|
||||||
|
OVERRIDE_ORDER = Kind.GLOBAL, Kind.USER, Kind.SITE, Kind.ENV, Kind.ENV_VAR
|
||||||
|
VALID_LOAD_ONLY = Kind.USER, Kind.GLOBAL, Kind.SITE
|
||||||
|
|
||||||
logger = getLogger(__name__)
|
logger = getLogger(__name__)
|
||||||
|
|
||||||
@@ -80,12 +87,19 @@ def get_configuration_files() -> dict[Kind, list[str]]:
|
|||||||
)
|
)
|
||||||
new_config_file = os.path.join(appdirs.user_config_dir("pip"), CONFIG_BASENAME)
|
new_config_file = os.path.join(appdirs.user_config_dir("pip"), CONFIG_BASENAME)
|
||||||
return {
|
return {
|
||||||
kinds.GLOBAL: global_config_files,
|
Kind.GLOBAL: global_config_files,
|
||||||
kinds.SITE: [site_config_file],
|
Kind.SITE: [site_config_file],
|
||||||
kinds.USER: [legacy_config_file, new_config_file],
|
Kind.USER: [legacy_config_file, new_config_file],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class _RawConfigParser(configparser.RawConfigParser):
|
||||||
|
"""RawConfigParser with normalized key names."""
|
||||||
|
|
||||||
|
def optionxform(self, optionstr: str) -> str:
|
||||||
|
return _normalize_name(optionstr)
|
||||||
|
|
||||||
|
|
||||||
class Configuration:
|
class Configuration:
|
||||||
"""Handles management of configuration.
|
"""Handles management of configuration.
|
||||||
|
|
||||||
@@ -120,6 +134,7 @@ class Configuration:
|
|||||||
variant: {} for variant in OVERRIDE_ORDER
|
variant: {} for variant in OVERRIDE_ORDER
|
||||||
}
|
}
|
||||||
self._modified_parsers: list[tuple[str, RawConfigParser]] = []
|
self._modified_parsers: list[tuple[str, RawConfigParser]] = []
|
||||||
|
self._use_env = False
|
||||||
|
|
||||||
def load(self) -> None:
|
def load(self) -> None:
|
||||||
"""Loads configuration from configuration files and environment"""
|
"""Loads configuration from configuration files and environment"""
|
||||||
@@ -133,7 +148,7 @@ class Configuration:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
return self._get_parser_to_modify()[0]
|
return self._get_parser_to_modify()[0]
|
||||||
except IndexError:
|
except ConfigurationError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def items(self) -> Iterable[tuple[str, Any]]:
|
def items(self) -> Iterable[tuple[str, Any]]:
|
||||||
@@ -184,12 +199,10 @@ class Configuration:
|
|||||||
self._ensure_have_load_only()
|
self._ensure_have_load_only()
|
||||||
|
|
||||||
assert self.load_only
|
assert self.load_only
|
||||||
fname, parser = self._get_parser_to_modify()
|
fname, parser = self._get_parser_to_modify(key)
|
||||||
|
load_config = Kind.ENV if self._use_env else self.load_only
|
||||||
if (
|
file_config = self._config[load_config].get(fname, {})
|
||||||
key not in self._config[self.load_only][fname]
|
if key not in file_config:
|
||||||
and key not in self._config[self.load_only]
|
|
||||||
):
|
|
||||||
raise ConfigurationError(f"No such key - {orig_key}")
|
raise ConfigurationError(f"No such key - {orig_key}")
|
||||||
|
|
||||||
if parser is not None:
|
if parser is not None:
|
||||||
@@ -207,9 +220,9 @@ class Configuration:
|
|||||||
parser.remove_section(section)
|
parser.remove_section(section)
|
||||||
self._mark_as_modified(fname, parser)
|
self._mark_as_modified(fname, parser)
|
||||||
try:
|
try:
|
||||||
del self._config[self.load_only][fname][key]
|
del self._config[load_config][fname][key]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
del self._config[self.load_only][key]
|
del self._config[load_config][key]
|
||||||
|
|
||||||
def save(self) -> None:
|
def save(self) -> None:
|
||||||
"""Save the current in-memory state."""
|
"""Save the current in-memory state."""
|
||||||
@@ -255,20 +268,27 @@ class Configuration:
|
|||||||
def _load_config_files(self) -> None:
|
def _load_config_files(self) -> None:
|
||||||
"""Loads configuration from configuration files"""
|
"""Loads configuration from configuration files"""
|
||||||
config_files = dict(self.iter_config_files())
|
config_files = dict(self.iter_config_files())
|
||||||
if config_files[kinds.ENV][0:1] == [os.devnull]:
|
if config_files[Kind.ENV][0:1] == [os.devnull]:
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"Skipping loading configuration files due to "
|
"Skipping loading configuration files due to "
|
||||||
"environment's PIP_CONFIG_FILE being os.devnull"
|
"environment's PIP_CONFIG_FILE being os.devnull"
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
env_config_file = os.environ.get("PIP_CONFIG_FILE")
|
||||||
for variant, files in config_files.items():
|
for variant, files in config_files.items():
|
||||||
for fname in files:
|
for fname in files:
|
||||||
# If there's specific variant set in `load_only`, load only
|
# If there's specific variant set in `load_only`, load only
|
||||||
# that variant, not the others.
|
# that variant, not the others.
|
||||||
if self.load_only is not None and variant != self.load_only:
|
if self.load_only is not None and variant != self.load_only:
|
||||||
logger.debug("Skipping file '%s' (variant: %s)", fname, variant)
|
is_env_redirect = (
|
||||||
continue
|
variant == Kind.ENV
|
||||||
|
and fname == env_config_file
|
||||||
|
and self.load_only == Kind.USER
|
||||||
|
)
|
||||||
|
if not is_env_redirect:
|
||||||
|
logger.debug("Skipping file '%s' (variant: %s)", fname, variant)
|
||||||
|
continue
|
||||||
|
|
||||||
parser = self._load_file(variant, fname)
|
parser = self._load_file(variant, fname)
|
||||||
|
|
||||||
@@ -279,27 +299,27 @@ class Configuration:
|
|||||||
logger.verbose("For variant '%s', will try loading '%s'", variant, fname)
|
logger.verbose("For variant '%s', will try loading '%s'", variant, fname)
|
||||||
parser = self._construct_parser(fname)
|
parser = self._construct_parser(fname)
|
||||||
|
|
||||||
|
self._config[variant].setdefault(fname, {})
|
||||||
for section in parser.sections():
|
for section in parser.sections():
|
||||||
items = parser.items(section)
|
items = parser.items(section)
|
||||||
self._config[variant].setdefault(fname, {})
|
|
||||||
self._config[variant][fname].update(self._normalized_keys(section, items))
|
self._config[variant][fname].update(self._normalized_keys(section, items))
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
def _construct_parser(self, fname: str) -> RawConfigParser:
|
def _construct_parser(self, fname: str) -> RawConfigParser:
|
||||||
parser = configparser.RawConfigParser()
|
parser = _RawConfigParser()
|
||||||
# If there is no such file, don't bother reading it but create the
|
# If there is no such file, don't bother reading it but create the
|
||||||
# parser anyway, to hold the data.
|
# parser anyway, to hold the data.
|
||||||
# Doing this is useful when modifying and saving files, where we don't
|
# Doing this is useful when modifying and saving files, where we don't
|
||||||
# need to construct a parser.
|
# need to construct a parser.
|
||||||
if os.path.exists(fname):
|
if os.path.exists(fname):
|
||||||
locale_encoding = locale.getpreferredencoding(False)
|
encoding = "utf-8" if sys.flags.utf8_mode else get_locale_encoding()
|
||||||
try:
|
try:
|
||||||
parser.read(fname, encoding=locale_encoding)
|
parser.read(fname, encoding=encoding)
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
# See https://github.com/pypa/pip/issues/4963
|
# See https://github.com/pypa/pip/issues/4963
|
||||||
raise ConfigurationFileCouldNotBeLoaded(
|
raise ConfigurationFileCouldNotBeLoaded(
|
||||||
reason=f"contains invalid {locale_encoding} characters",
|
reason=f"contains invalid {encoding} characters",
|
||||||
fname=fname,
|
fname=fname,
|
||||||
)
|
)
|
||||||
except configparser.Error as error:
|
except configparser.Error as error:
|
||||||
@@ -309,8 +329,8 @@ class Configuration:
|
|||||||
|
|
||||||
def _load_environment_vars(self) -> None:
|
def _load_environment_vars(self) -> None:
|
||||||
"""Loads configuration from environment variables"""
|
"""Loads configuration from environment variables"""
|
||||||
self._config[kinds.ENV_VAR].setdefault(":env:", {})
|
self._config[Kind.ENV_VAR].setdefault(":env:", {})
|
||||||
self._config[kinds.ENV_VAR][":env:"].update(
|
self._config[Kind.ENV_VAR][":env:"].update(
|
||||||
self._normalized_keys(":env:", self.get_environ_vars())
|
self._normalized_keys(":env:", self.get_environ_vars())
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -351,7 +371,7 @@ class Configuration:
|
|||||||
env_config_file = os.environ.get("PIP_CONFIG_FILE", None)
|
env_config_file = os.environ.get("PIP_CONFIG_FILE", None)
|
||||||
config_files = get_configuration_files()
|
config_files = get_configuration_files()
|
||||||
|
|
||||||
yield kinds.GLOBAL, config_files[kinds.GLOBAL]
|
yield Kind.GLOBAL, config_files[Kind.GLOBAL]
|
||||||
|
|
||||||
# per-user config is not loaded when env_config_file exists
|
# per-user config is not loaded when env_config_file exists
|
||||||
should_load_user_config = not self.isolated and not (
|
should_load_user_config = not self.isolated and not (
|
||||||
@@ -359,30 +379,58 @@ class Configuration:
|
|||||||
)
|
)
|
||||||
if should_load_user_config:
|
if should_load_user_config:
|
||||||
# The legacy config file is overridden by the new config file
|
# The legacy config file is overridden by the new config file
|
||||||
yield kinds.USER, config_files[kinds.USER]
|
yield Kind.USER, config_files[Kind.USER]
|
||||||
|
|
||||||
# virtualenv config
|
# virtualenv config
|
||||||
yield kinds.SITE, config_files[kinds.SITE]
|
yield Kind.SITE, config_files[Kind.SITE]
|
||||||
|
|
||||||
if env_config_file is not None:
|
if env_config_file is not None:
|
||||||
yield kinds.ENV, [env_config_file]
|
yield Kind.ENV, [env_config_file]
|
||||||
else:
|
else:
|
||||||
yield kinds.ENV, []
|
yield Kind.ENV, []
|
||||||
|
|
||||||
def get_values_in_config(self, variant: Kind) -> dict[str, Any]:
|
def get_values_in_config(self, variant: Kind) -> dict[str, Any]:
|
||||||
"""Get values present in a config file"""
|
"""Get values present in a config file"""
|
||||||
return self._config[variant]
|
return self._config[variant]
|
||||||
|
|
||||||
def _get_parser_to_modify(self) -> tuple[str, RawConfigParser]:
|
def _get_parser_to_modify(
|
||||||
|
self, key: str | None = None
|
||||||
|
) -> tuple[str, RawConfigParser]:
|
||||||
# Determine which parser to modify
|
# Determine which parser to modify
|
||||||
assert self.load_only
|
assert self.load_only
|
||||||
parsers = self._parsers[self.load_only]
|
parsers = self._parsers[self.load_only]
|
||||||
if not parsers:
|
if not parsers:
|
||||||
# This should not happen if everything works correctly.
|
env_config_file = os.environ.get("PIP_CONFIG_FILE")
|
||||||
|
if env_config_file == os.devnull:
|
||||||
|
raise ConfigurationError(
|
||||||
|
"Cannot write to PIP_CONFIG_VALUE when it is set to "
|
||||||
|
f"{env_config_file}"
|
||||||
|
)
|
||||||
|
if env_config_file and self.load_only in (Kind.USER, Kind.GLOBAL):
|
||||||
|
parser = self._construct_parser(env_config_file)
|
||||||
|
self._parsers[self.load_only].append((env_config_file, parser))
|
||||||
|
self._use_env = True
|
||||||
|
logger.warning(
|
||||||
|
"Because PIP_CONFIG_FILE is set, changes will be applied to "
|
||||||
|
"'%s', not to '%s'. To restore normal behavior, "
|
||||||
|
"unset PIP_CONFIG_FILE.",
|
||||||
|
env_config_file,
|
||||||
|
self.load_only,
|
||||||
|
)
|
||||||
|
return env_config_file, parser
|
||||||
|
|
||||||
raise ConfigurationError(
|
raise ConfigurationError(
|
||||||
"Fatal Internal error [id=2]. Please report as a bug."
|
"Fatal Internal error [id=2]. Please report as a bug."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if key is None:
|
||||||
|
return parsers[-1]
|
||||||
|
|
||||||
|
section, name = _disassemble_key(key)
|
||||||
|
for fname, parser in reversed(parsers):
|
||||||
|
if parser.has_section(section) and parser.has_option(section, name):
|
||||||
|
return fname, parser
|
||||||
|
|
||||||
# Use the highest priority parser.
|
# Use the highest priority parser.
|
||||||
return parsers[-1]
|
return parsers[-1]
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from pip._internal.metadata.base import BaseDistribution
|
|||||||
from pip._internal.req import InstallRequirement
|
from pip._internal.req import InstallRequirement
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from pip._internal.build_env import BuildEnvironmentInstaller
|
from pip._internal.build_env import BuildEnvironmentInstaller, BuildIsolationMode
|
||||||
|
|
||||||
|
|
||||||
class AbstractDistribution(metaclass=abc.ABCMeta):
|
class AbstractDistribution(metaclass=abc.ABCMeta):
|
||||||
@@ -33,7 +33,8 @@ class AbstractDistribution(metaclass=abc.ABCMeta):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.req = req
|
self.req = req
|
||||||
|
|
||||||
@abc.abstractproperty
|
@property
|
||||||
|
@abc.abstractmethod
|
||||||
def build_tracker_id(self) -> str | None:
|
def build_tracker_id(self) -> str | None:
|
||||||
"""A string that uniquely identifies this requirement to the build tracker.
|
"""A string that uniquely identifies this requirement to the build tracker.
|
||||||
|
|
||||||
@@ -49,7 +50,8 @@ class AbstractDistribution(metaclass=abc.ABCMeta):
|
|||||||
def prepare_distribution_metadata(
|
def prepare_distribution_metadata(
|
||||||
self,
|
self,
|
||||||
build_env_installer: BuildEnvironmentInstaller,
|
build_env_installer: BuildEnvironmentInstaller,
|
||||||
build_isolation: bool,
|
build_isolation: BuildIsolationMode,
|
||||||
check_build_deps: bool,
|
check_build_deps: bool,
|
||||||
|
allow_editables: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
@@ -6,7 +6,7 @@ from pip._internal.distributions.base import AbstractDistribution
|
|||||||
from pip._internal.metadata import BaseDistribution
|
from pip._internal.metadata import BaseDistribution
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from pip._internal.build_env import BuildEnvironmentInstaller
|
from pip._internal.build_env import BuildEnvironmentInstaller, BuildIsolationMode
|
||||||
|
|
||||||
|
|
||||||
class InstalledDistribution(AbstractDistribution):
|
class InstalledDistribution(AbstractDistribution):
|
||||||
@@ -27,7 +27,8 @@ class InstalledDistribution(AbstractDistribution):
|
|||||||
def prepare_distribution_metadata(
|
def prepare_distribution_metadata(
|
||||||
self,
|
self,
|
||||||
build_env_installer: BuildEnvironmentInstaller,
|
build_env_installer: BuildEnvironmentInstaller,
|
||||||
build_isolation: bool,
|
build_isolation: BuildIsolationMode,
|
||||||
check_build_deps: bool,
|
check_build_deps: bool,
|
||||||
|
allow_editables: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
pass
|
pass
|
||||||
@@ -2,9 +2,15 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
|
from contextlib import nullcontext
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from pip._internal.build_env import BuildEnvironment
|
from pip._internal.build_env import (
|
||||||
|
BuildIsolationMode,
|
||||||
|
NoOpBuildEnvironment,
|
||||||
|
VenvBuildEnvironment,
|
||||||
|
VirtualBuildEnvironment,
|
||||||
|
)
|
||||||
from pip._internal.distributions.base import AbstractDistribution
|
from pip._internal.distributions.base import AbstractDistribution
|
||||||
from pip._internal.exceptions import InstallationError
|
from pip._internal.exceptions import InstallationError
|
||||||
from pip._internal.metadata import BaseDistribution
|
from pip._internal.metadata import BaseDistribution
|
||||||
@@ -35,24 +41,28 @@ class SourceDistribution(AbstractDistribution):
|
|||||||
def prepare_distribution_metadata(
|
def prepare_distribution_metadata(
|
||||||
self,
|
self,
|
||||||
build_env_installer: BuildEnvironmentInstaller,
|
build_env_installer: BuildEnvironmentInstaller,
|
||||||
build_isolation: bool,
|
build_isolation: BuildIsolationMode,
|
||||||
check_build_deps: bool,
|
check_build_deps: bool,
|
||||||
|
allow_editables: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
# Load pyproject.toml
|
# Load pyproject.toml and set up backend environment
|
||||||
self.req.load_pyproject_toml()
|
self.req.load_pyproject_toml()
|
||||||
|
self._prepare_build_env(build_isolation, build_env_installer)
|
||||||
|
|
||||||
# Set up the build isolation, if this requirement should be isolated
|
# Set up the build isolation, if this requirement should be isolated
|
||||||
if build_isolation:
|
if build_isolation != "off":
|
||||||
# Setup an isolated environment and install the build backend static
|
# Setup an isolated environment and install the build backend static
|
||||||
# requirements in it.
|
# requirements in it.
|
||||||
self._prepare_build_backend(build_env_installer)
|
self._prepare_build_backend(build_isolation)
|
||||||
# Check that the build backend supports PEP 660. This cannot be done
|
# Check that the build backend supports PEP 660. This cannot be done
|
||||||
# earlier because we need to setup the build backend to verify it
|
# earlier because we need to setup the build backend to verify it
|
||||||
# supports build_editable, nor can it be done later, because we want
|
# supports build_editable, nor can it be done later, because we want
|
||||||
# to avoid installing build requirements needlessly.
|
# to avoid installing build requirements needlessly.
|
||||||
self.req.editable_sanity_check()
|
self.req.editable_sanity_check()
|
||||||
# Install the dynamic build requirements.
|
# Install the dynamic build requirements.
|
||||||
self._install_build_reqs(build_env_installer)
|
self._install_build_reqs(
|
||||||
|
build_env_installer, build_isolation, allow_editables=allow_editables
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
# When not using build isolation, we still need to check that
|
# When not using build isolation, we still need to check that
|
||||||
# the build backend supports PEP 660.
|
# the build backend supports PEP 660.
|
||||||
@@ -68,20 +78,34 @@ class SourceDistribution(AbstractDistribution):
|
|||||||
self._raise_conflicts("the backend dependencies", conflicting)
|
self._raise_conflicts("the backend dependencies", conflicting)
|
||||||
if missing:
|
if missing:
|
||||||
self._raise_missing_reqs(missing)
|
self._raise_missing_reqs(missing)
|
||||||
self.req.prepare_metadata()
|
self.req.prepare_metadata(allow_editables)
|
||||||
|
|
||||||
def _prepare_build_backend(
|
def _prepare_build_env(
|
||||||
self, build_env_installer: BuildEnvironmentInstaller
|
self,
|
||||||
|
build_isolation: BuildIsolationMode,
|
||||||
|
build_env_installer: BuildEnvironmentInstaller,
|
||||||
) -> None:
|
) -> None:
|
||||||
# Isolate in a BuildEnvironment and install the build-time
|
if build_isolation == "virtual":
|
||||||
# requirements.
|
self.req.build_env = VirtualBuildEnvironment(build_env_installer)
|
||||||
|
elif build_isolation == "venv":
|
||||||
|
self.req.build_env = VenvBuildEnvironment(build_env_installer)
|
||||||
|
|
||||||
|
self.req.configure_backend(self.req.build_env.python_executable)
|
||||||
|
|
||||||
|
def _prepare_build_backend(self, build_isolation: BuildIsolationMode) -> None:
|
||||||
|
# Install the pyproject.toml declared build-time requirements.
|
||||||
pyproject_requires = self.req.pyproject_requires
|
pyproject_requires = self.req.pyproject_requires
|
||||||
assert pyproject_requires is not None
|
assert pyproject_requires is not None
|
||||||
|
assert not isinstance(self.req.build_env, NoOpBuildEnvironment)
|
||||||
|
|
||||||
self.req.build_env = BuildEnvironment(build_env_installer)
|
context = self.req.build_env if build_isolation == "venv" else nullcontext()
|
||||||
self.req.build_env.install_requirements(
|
with context:
|
||||||
pyproject_requires, "overlay", kind="build dependencies", for_req=self.req
|
self.req.build_env.install_requirements(
|
||||||
)
|
pyproject_requires,
|
||||||
|
"overlay",
|
||||||
|
kind="build dependencies",
|
||||||
|
for_req=self.req,
|
||||||
|
)
|
||||||
conflicting, missing = self.req.build_env.check_requirements(
|
conflicting, missing = self.req.build_env.check_requirements(
|
||||||
self.req.requirements_to_check
|
self.req.requirements_to_check
|
||||||
)
|
)
|
||||||
@@ -117,14 +141,17 @@ class SourceDistribution(AbstractDistribution):
|
|||||||
return backend.get_requires_for_build_editable()
|
return backend.get_requires_for_build_editable()
|
||||||
|
|
||||||
def _install_build_reqs(
|
def _install_build_reqs(
|
||||||
self, build_env_installer: BuildEnvironmentInstaller
|
self,
|
||||||
|
build_env_installer: BuildEnvironmentInstaller,
|
||||||
|
build_isolation: BuildIsolationMode,
|
||||||
|
allow_editables: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
# Install any extra build dependencies that the backend requests.
|
# Install any extra build dependencies that the backend requests.
|
||||||
# This must be done in a second pass, as the pyproject.toml
|
# This must be done in a second pass, as the pyproject.toml
|
||||||
# dependencies must be installed before we can call the backend.
|
# dependencies must be installed before we can call the backend.
|
||||||
if (
|
if (
|
||||||
self.req.editable
|
self.req.editable
|
||||||
and self.req.permit_editable_wheels
|
and allow_editables
|
||||||
and self.req.supports_pyproject_editable
|
and self.req.supports_pyproject_editable
|
||||||
):
|
):
|
||||||
build_reqs = self._get_build_requires_editable()
|
build_reqs = self._get_build_requires_editable()
|
||||||
@@ -133,9 +160,11 @@ class SourceDistribution(AbstractDistribution):
|
|||||||
conflicting, missing = self.req.build_env.check_requirements(build_reqs)
|
conflicting, missing = self.req.build_env.check_requirements(build_reqs)
|
||||||
if conflicting:
|
if conflicting:
|
||||||
self._raise_conflicts("the backend dependencies", conflicting)
|
self._raise_conflicts("the backend dependencies", conflicting)
|
||||||
self.req.build_env.install_requirements(
|
context = self.req.build_env if build_isolation == "venv" else nullcontext()
|
||||||
missing, "normal", kind="backend dependencies", for_req=self.req
|
with context:
|
||||||
)
|
self.req.build_env.install_requirements(
|
||||||
|
missing, "normal", kind="backend dependencies", for_req=self.req
|
||||||
|
)
|
||||||
|
|
||||||
def _raise_conflicts(
|
def _raise_conflicts(
|
||||||
self, conflicting_with: str, conflicting_reqs: set[tuple[str, str]]
|
self, conflicting_with: str, conflicting_reqs: set[tuple[str, str]]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from pip._internal.metadata import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from pip._internal.build_env import BuildEnvironmentInstaller
|
from pip._internal.build_env import BuildEnvironmentInstaller, BuildIsolationMode
|
||||||
|
|
||||||
|
|
||||||
class WheelDistribution(AbstractDistribution):
|
class WheelDistribution(AbstractDistribution):
|
||||||
@@ -38,7 +38,8 @@ class WheelDistribution(AbstractDistribution):
|
|||||||
def prepare_distribution_metadata(
|
def prepare_distribution_metadata(
|
||||||
self,
|
self,
|
||||||
build_env_installer: BuildEnvironmentInstaller,
|
build_env_installer: BuildEnvironmentInstaller,
|
||||||
build_isolation: bool,
|
build_isolation: BuildIsolationMode,
|
||||||
check_build_deps: bool,
|
check_build_deps: bool,
|
||||||
|
allow_editables: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
pass
|
pass
|
||||||
@@ -1,971 +0,0 @@
|
|||||||
"""Exceptions used throughout package.
|
|
||||||
|
|
||||||
This module MUST NOT try to import from anything within `pip._internal` to
|
|
||||||
operate. This is expected to be importable from any/all files within the
|
|
||||||
subpackage and, thus, should not depend on them.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import configparser
|
|
||||||
import contextlib
|
|
||||||
import locale
|
|
||||||
import logging
|
|
||||||
import pathlib
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
import traceback
|
|
||||||
from collections.abc import Iterable, Iterator
|
|
||||||
from itertools import chain, groupby, repeat
|
|
||||||
from typing import TYPE_CHECKING, Literal
|
|
||||||
|
|
||||||
from pip._vendor.packaging.requirements import InvalidRequirement
|
|
||||||
from pip._vendor.packaging.version import InvalidVersion
|
|
||||||
from pip._vendor.rich.console import Console, ConsoleOptions, RenderResult
|
|
||||||
from pip._vendor.rich.markup import escape
|
|
||||||
from pip._vendor.rich.text import Text
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from hashlib import _Hash
|
|
||||||
|
|
||||||
from pip._vendor.requests.models import PreparedRequest, Request, Response
|
|
||||||
|
|
||||||
from pip._internal.metadata import BaseDistribution
|
|
||||||
from pip._internal.models.link import Link
|
|
||||||
from pip._internal.network.download import _FileDownload
|
|
||||||
from pip._internal.req.req_install import InstallRequirement
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Scaffolding
|
|
||||||
#
|
|
||||||
def _is_kebab_case(s: str) -> bool:
|
|
||||||
return re.match(r"^[a-z]+(-[a-z]+)*$", s) is not None
|
|
||||||
|
|
||||||
|
|
||||||
def _prefix_with_indent(
|
|
||||||
s: Text | str,
|
|
||||||
console: Console,
|
|
||||||
*,
|
|
||||||
prefix: str,
|
|
||||||
indent: str,
|
|
||||||
) -> Text:
|
|
||||||
if isinstance(s, Text):
|
|
||||||
text = s
|
|
||||||
else:
|
|
||||||
text = console.render_str(s)
|
|
||||||
|
|
||||||
return console.render_str(prefix, overflow="ignore") + console.render_str(
|
|
||||||
f"\n{indent}", overflow="ignore"
|
|
||||||
).join(text.split(allow_blank=True))
|
|
||||||
|
|
||||||
|
|
||||||
class PipError(Exception):
|
|
||||||
"""The base pip error."""
|
|
||||||
|
|
||||||
|
|
||||||
class DiagnosticPipError(PipError):
|
|
||||||
"""An error, that presents diagnostic information to the user.
|
|
||||||
|
|
||||||
This contains a bunch of logic, to enable pretty presentation of our error
|
|
||||||
messages. Each error gets a unique reference. Each error can also include
|
|
||||||
additional context, a hint and/or a note -- which are presented with the
|
|
||||||
main error message in a consistent style.
|
|
||||||
|
|
||||||
This is adapted from the error output styling in `sphinx-theme-builder`.
|
|
||||||
"""
|
|
||||||
|
|
||||||
reference: str
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
kind: Literal["error", "warning"] = "error",
|
|
||||||
reference: str | None = None,
|
|
||||||
message: str | Text,
|
|
||||||
context: str | Text | None,
|
|
||||||
hint_stmt: str | Text | None,
|
|
||||||
note_stmt: str | Text | None = None,
|
|
||||||
link: str | None = None,
|
|
||||||
) -> None:
|
|
||||||
# Ensure a proper reference is provided.
|
|
||||||
if reference is None:
|
|
||||||
assert hasattr(self, "reference"), "error reference not provided!"
|
|
||||||
reference = self.reference
|
|
||||||
assert _is_kebab_case(reference), "error reference must be kebab-case!"
|
|
||||||
|
|
||||||
self.kind = kind
|
|
||||||
self.reference = reference
|
|
||||||
|
|
||||||
self.message = message
|
|
||||||
self.context = context
|
|
||||||
|
|
||||||
self.note_stmt = note_stmt
|
|
||||||
self.hint_stmt = hint_stmt
|
|
||||||
|
|
||||||
self.link = link
|
|
||||||
|
|
||||||
super().__init__(f"<{self.__class__.__name__}: {self.reference}>")
|
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
|
||||||
return (
|
|
||||||
f"<{self.__class__.__name__}("
|
|
||||||
f"reference={self.reference!r}, "
|
|
||||||
f"message={self.message!r}, "
|
|
||||||
f"context={self.context!r}, "
|
|
||||||
f"note_stmt={self.note_stmt!r}, "
|
|
||||||
f"hint_stmt={self.hint_stmt!r}"
|
|
||||||
")>"
|
|
||||||
)
|
|
||||||
|
|
||||||
def __rich_console__(
|
|
||||||
self,
|
|
||||||
console: Console,
|
|
||||||
options: ConsoleOptions,
|
|
||||||
) -> RenderResult:
|
|
||||||
colour = "red" if self.kind == "error" else "yellow"
|
|
||||||
|
|
||||||
yield f"[{colour} bold]{self.kind}[/]: [bold]{self.reference}[/]"
|
|
||||||
yield ""
|
|
||||||
|
|
||||||
if not options.ascii_only:
|
|
||||||
# Present the main message, with relevant context indented.
|
|
||||||
if self.context is not None:
|
|
||||||
yield _prefix_with_indent(
|
|
||||||
self.message,
|
|
||||||
console,
|
|
||||||
prefix=f"[{colour}]×[/] ",
|
|
||||||
indent=f"[{colour}]│[/] ",
|
|
||||||
)
|
|
||||||
yield _prefix_with_indent(
|
|
||||||
self.context,
|
|
||||||
console,
|
|
||||||
prefix=f"[{colour}]╰─>[/] ",
|
|
||||||
indent=f"[{colour}] [/] ",
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
yield _prefix_with_indent(
|
|
||||||
self.message,
|
|
||||||
console,
|
|
||||||
prefix="[red]×[/] ",
|
|
||||||
indent=" ",
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
yield self.message
|
|
||||||
if self.context is not None:
|
|
||||||
yield ""
|
|
||||||
yield self.context
|
|
||||||
|
|
||||||
if self.note_stmt is not None or self.hint_stmt is not None:
|
|
||||||
yield ""
|
|
||||||
|
|
||||||
if self.note_stmt is not None:
|
|
||||||
yield _prefix_with_indent(
|
|
||||||
self.note_stmt,
|
|
||||||
console,
|
|
||||||
prefix="[magenta bold]note[/]: ",
|
|
||||||
indent=" ",
|
|
||||||
)
|
|
||||||
if self.hint_stmt is not None:
|
|
||||||
yield _prefix_with_indent(
|
|
||||||
self.hint_stmt,
|
|
||||||
console,
|
|
||||||
prefix="[cyan bold]hint[/]: ",
|
|
||||||
indent=" ",
|
|
||||||
)
|
|
||||||
|
|
||||||
if self.link is not None:
|
|
||||||
yield ""
|
|
||||||
yield f"Link: {self.link}"
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Actual Errors
|
|
||||||
#
|
|
||||||
class ConfigurationError(PipError):
|
|
||||||
"""General exception in configuration"""
|
|
||||||
|
|
||||||
|
|
||||||
class InstallationError(PipError):
|
|
||||||
"""General exception during installation"""
|
|
||||||
|
|
||||||
|
|
||||||
class FailedToPrepareCandidate(InstallationError):
|
|
||||||
"""Raised when we fail to prepare a candidate (i.e. fetch and generate metadata).
|
|
||||||
|
|
||||||
This is intentionally not a diagnostic error, since the output will be presented
|
|
||||||
above this error, when this occurs. This should instead present information to the
|
|
||||||
user.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self, *, package_name: str, requirement_chain: str, failed_step: str
|
|
||||||
) -> None:
|
|
||||||
super().__init__(f"Failed to build '{package_name}' when {failed_step.lower()}")
|
|
||||||
self.package_name = package_name
|
|
||||||
self.requirement_chain = requirement_chain
|
|
||||||
self.failed_step = failed_step
|
|
||||||
|
|
||||||
|
|
||||||
class MissingPyProjectBuildRequires(DiagnosticPipError):
|
|
||||||
"""Raised when pyproject.toml has `build-system`, but no `build-system.requires`."""
|
|
||||||
|
|
||||||
reference = "missing-pyproject-build-system-requires"
|
|
||||||
|
|
||||||
def __init__(self, *, package: str) -> None:
|
|
||||||
super().__init__(
|
|
||||||
message=f"Can not process {escape(package)}",
|
|
||||||
context=Text(
|
|
||||||
"This package has an invalid pyproject.toml file.\n"
|
|
||||||
"The [build-system] table is missing the mandatory `requires` key."
|
|
||||||
),
|
|
||||||
note_stmt="This is an issue with the package mentioned above, not pip.",
|
|
||||||
hint_stmt=Text("See PEP 518 for the detailed specification."),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class InvalidPyProjectBuildRequires(DiagnosticPipError):
|
|
||||||
"""Raised when pyproject.toml an invalid `build-system.requires`."""
|
|
||||||
|
|
||||||
reference = "invalid-pyproject-build-system-requires"
|
|
||||||
|
|
||||||
def __init__(self, *, package: str, reason: str) -> None:
|
|
||||||
super().__init__(
|
|
||||||
message=f"Can not process {escape(package)}",
|
|
||||||
context=Text(
|
|
||||||
"This package has an invalid `build-system.requires` key in "
|
|
||||||
f"pyproject.toml.\n{reason}"
|
|
||||||
),
|
|
||||||
note_stmt="This is an issue with the package mentioned above, not pip.",
|
|
||||||
hint_stmt=Text("See PEP 518 for the detailed specification."),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class NoneMetadataError(PipError):
|
|
||||||
"""Raised when accessing a Distribution's "METADATA" or "PKG-INFO".
|
|
||||||
|
|
||||||
This signifies an inconsistency, when the Distribution claims to have
|
|
||||||
the metadata file (if not, raise ``FileNotFoundError`` instead), but is
|
|
||||||
not actually able to produce its content. This may be due to permission
|
|
||||||
errors.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
dist: BaseDistribution,
|
|
||||||
metadata_name: str,
|
|
||||||
) -> None:
|
|
||||||
"""
|
|
||||||
:param dist: A Distribution object.
|
|
||||||
:param metadata_name: The name of the metadata being accessed
|
|
||||||
(can be "METADATA" or "PKG-INFO").
|
|
||||||
"""
|
|
||||||
self.dist = dist
|
|
||||||
self.metadata_name = metadata_name
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
# Use `dist` in the error message because its stringification
|
|
||||||
# includes more information, like the version and location.
|
|
||||||
return f"None {self.metadata_name} metadata found for distribution: {self.dist}"
|
|
||||||
|
|
||||||
|
|
||||||
class UserInstallationInvalid(InstallationError):
|
|
||||||
"""A --user install is requested on an environment without user site."""
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return "User base directory is not specified"
|
|
||||||
|
|
||||||
|
|
||||||
class InvalidSchemeCombination(InstallationError):
|
|
||||||
def __str__(self) -> str:
|
|
||||||
before = ", ".join(str(a) for a in self.args[:-1])
|
|
||||||
return f"Cannot set {before} and {self.args[-1]} together"
|
|
||||||
|
|
||||||
|
|
||||||
class DistributionNotFound(InstallationError):
|
|
||||||
"""Raised when a distribution cannot be found to satisfy a requirement"""
|
|
||||||
|
|
||||||
|
|
||||||
class RequirementsFileParseError(InstallationError):
|
|
||||||
"""Raised when a general error occurs parsing a requirements file line."""
|
|
||||||
|
|
||||||
|
|
||||||
class BestVersionAlreadyInstalled(PipError):
|
|
||||||
"""Raised when the most up-to-date version of a package is already
|
|
||||||
installed."""
|
|
||||||
|
|
||||||
|
|
||||||
class BadCommand(PipError):
|
|
||||||
"""Raised when virtualenv or a command is not found"""
|
|
||||||
|
|
||||||
|
|
||||||
class CommandError(PipError):
|
|
||||||
"""Raised when there is an error in command-line arguments"""
|
|
||||||
|
|
||||||
|
|
||||||
class PreviousBuildDirError(PipError):
|
|
||||||
"""Raised when there's a previous conflicting build directory"""
|
|
||||||
|
|
||||||
|
|
||||||
class NetworkConnectionError(PipError):
|
|
||||||
"""HTTP connection error"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
error_msg: str,
|
|
||||||
response: Response | None = None,
|
|
||||||
request: Request | PreparedRequest | None = None,
|
|
||||||
) -> None:
|
|
||||||
"""
|
|
||||||
Initialize NetworkConnectionError with `request` and `response`
|
|
||||||
objects.
|
|
||||||
"""
|
|
||||||
self.response = response
|
|
||||||
self.request = request
|
|
||||||
self.error_msg = error_msg
|
|
||||||
if (
|
|
||||||
self.response is not None
|
|
||||||
and not self.request
|
|
||||||
and hasattr(response, "request")
|
|
||||||
):
|
|
||||||
self.request = self.response.request
|
|
||||||
super().__init__(error_msg, response, request)
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.error_msg)
|
|
||||||
|
|
||||||
|
|
||||||
class InvalidWheelFilename(InstallationError):
|
|
||||||
"""Invalid wheel filename."""
|
|
||||||
|
|
||||||
|
|
||||||
class UnsupportedWheel(InstallationError):
|
|
||||||
"""Unsupported wheel."""
|
|
||||||
|
|
||||||
|
|
||||||
class InvalidWheel(InstallationError):
|
|
||||||
"""Invalid (e.g. corrupt) wheel."""
|
|
||||||
|
|
||||||
def __init__(self, location: str, name: str):
|
|
||||||
self.location = location
|
|
||||||
self.name = name
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return f"Wheel '{self.name}' located at {self.location} is invalid."
|
|
||||||
|
|
||||||
|
|
||||||
class MetadataInconsistent(InstallationError):
|
|
||||||
"""Built metadata contains inconsistent information.
|
|
||||||
|
|
||||||
This is raised when the metadata contains values (e.g. name and version)
|
|
||||||
that do not match the information previously obtained from sdist filename,
|
|
||||||
user-supplied ``#egg=`` value, or an install requirement name.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self, ireq: InstallRequirement, field: str, f_val: str, m_val: str
|
|
||||||
) -> None:
|
|
||||||
self.ireq = ireq
|
|
||||||
self.field = field
|
|
||||||
self.f_val = f_val
|
|
||||||
self.m_val = m_val
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return (
|
|
||||||
f"Requested {self.ireq} has inconsistent {self.field}: "
|
|
||||||
f"expected {self.f_val!r}, but metadata has {self.m_val!r}"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class MetadataInvalid(InstallationError):
|
|
||||||
"""Metadata is invalid."""
|
|
||||||
|
|
||||||
def __init__(self, ireq: InstallRequirement, error: str) -> None:
|
|
||||||
self.ireq = ireq
|
|
||||||
self.error = error
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return f"Requested {self.ireq} has invalid metadata: {self.error}"
|
|
||||||
|
|
||||||
|
|
||||||
class InstallationSubprocessError(DiagnosticPipError, InstallationError):
|
|
||||||
"""A subprocess call failed."""
|
|
||||||
|
|
||||||
reference = "subprocess-exited-with-error"
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
command_description: str,
|
|
||||||
exit_code: int,
|
|
||||||
output_lines: list[str] | None,
|
|
||||||
) -> None:
|
|
||||||
if output_lines is None:
|
|
||||||
output_prompt = Text("No available output.")
|
|
||||||
else:
|
|
||||||
output_prompt = (
|
|
||||||
Text.from_markup(f"[red][{len(output_lines)} lines of output][/]\n")
|
|
||||||
+ Text("".join(output_lines))
|
|
||||||
+ Text.from_markup(R"[red]\[end of output][/]")
|
|
||||||
)
|
|
||||||
|
|
||||||
super().__init__(
|
|
||||||
message=(
|
|
||||||
f"[green]{escape(command_description)}[/] did not run successfully.\n"
|
|
||||||
f"exit code: {exit_code}"
|
|
||||||
),
|
|
||||||
context=output_prompt,
|
|
||||||
hint_stmt=None,
|
|
||||||
note_stmt=(
|
|
||||||
"This error originates from a subprocess, and is likely not a "
|
|
||||||
"problem with pip."
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
self.command_description = command_description
|
|
||||||
self.exit_code = exit_code
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return f"{self.command_description} exited with {self.exit_code}"
|
|
||||||
|
|
||||||
|
|
||||||
class MetadataGenerationFailed(DiagnosticPipError, InstallationError):
|
|
||||||
reference = "metadata-generation-failed"
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
package_details: str,
|
|
||||||
) -> None:
|
|
||||||
super().__init__(
|
|
||||||
message="Encountered error while generating package metadata.",
|
|
||||||
context=escape(package_details),
|
|
||||||
hint_stmt="See above for details.",
|
|
||||||
note_stmt="This is an issue with the package mentioned above, not pip.",
|
|
||||||
)
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return "metadata generation failed"
|
|
||||||
|
|
||||||
|
|
||||||
class HashErrors(InstallationError):
|
|
||||||
"""Multiple HashError instances rolled into one for reporting"""
|
|
||||||
|
|
||||||
def __init__(self) -> None:
|
|
||||||
self.errors: list[HashError] = []
|
|
||||||
|
|
||||||
def append(self, error: HashError) -> None:
|
|
||||||
self.errors.append(error)
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
lines = []
|
|
||||||
self.errors.sort(key=lambda e: e.order)
|
|
||||||
for cls, errors_of_cls in groupby(self.errors, lambda e: e.__class__):
|
|
||||||
lines.append(cls.head)
|
|
||||||
lines.extend(e.body() for e in errors_of_cls)
|
|
||||||
if lines:
|
|
||||||
return "\n".join(lines)
|
|
||||||
return ""
|
|
||||||
|
|
||||||
def __bool__(self) -> bool:
|
|
||||||
return bool(self.errors)
|
|
||||||
|
|
||||||
|
|
||||||
class HashError(InstallationError):
|
|
||||||
"""
|
|
||||||
A failure to verify a package against known-good hashes
|
|
||||||
|
|
||||||
:cvar order: An int sorting hash exception classes by difficulty of
|
|
||||||
recovery (lower being harder), so the user doesn't bother fretting
|
|
||||||
about unpinned packages when he has deeper issues, like VCS
|
|
||||||
dependencies, to deal with. Also keeps error reports in a
|
|
||||||
deterministic order.
|
|
||||||
:cvar head: A section heading for display above potentially many
|
|
||||||
exceptions of this kind
|
|
||||||
:ivar req: The InstallRequirement that triggered this error. This is
|
|
||||||
pasted on after the exception is instantiated, because it's not
|
|
||||||
typically available earlier.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
req: InstallRequirement | None = None
|
|
||||||
head = ""
|
|
||||||
order: int = -1
|
|
||||||
|
|
||||||
def body(self) -> str:
|
|
||||||
"""Return a summary of me for display under the heading.
|
|
||||||
|
|
||||||
This default implementation simply prints a description of the
|
|
||||||
triggering requirement.
|
|
||||||
|
|
||||||
:param req: The InstallRequirement that provoked this error, with
|
|
||||||
its link already populated by the resolver's _populate_link().
|
|
||||||
|
|
||||||
"""
|
|
||||||
return f" {self._requirement_name()}"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return f"{self.head}\n{self.body()}"
|
|
||||||
|
|
||||||
def _requirement_name(self) -> str:
|
|
||||||
"""Return a description of the requirement that triggered me.
|
|
||||||
|
|
||||||
This default implementation returns long description of the req, with
|
|
||||||
line numbers
|
|
||||||
|
|
||||||
"""
|
|
||||||
return str(self.req) if self.req else "unknown package"
|
|
||||||
|
|
||||||
|
|
||||||
class VcsHashUnsupported(HashError):
|
|
||||||
"""A hash was provided for a version-control-system-based requirement, but
|
|
||||||
we don't have a method for hashing those."""
|
|
||||||
|
|
||||||
order = 0
|
|
||||||
head = (
|
|
||||||
"Can't verify hashes for these requirements because we don't "
|
|
||||||
"have a way to hash version control repositories:"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class DirectoryUrlHashUnsupported(HashError):
|
|
||||||
"""A hash was provided for a version-control-system-based requirement, but
|
|
||||||
we don't have a method for hashing those."""
|
|
||||||
|
|
||||||
order = 1
|
|
||||||
head = (
|
|
||||||
"Can't verify hashes for these file:// requirements because they "
|
|
||||||
"point to directories:"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class HashMissing(HashError):
|
|
||||||
"""A hash was needed for a requirement but is absent."""
|
|
||||||
|
|
||||||
order = 2
|
|
||||||
head = (
|
|
||||||
"Hashes are required in --require-hashes mode, but they are "
|
|
||||||
"missing from some requirements. Here is a list of those "
|
|
||||||
"requirements along with the hashes their downloaded archives "
|
|
||||||
"actually had. Add lines like these to your requirements files to "
|
|
||||||
"prevent tampering. (If you did not enable --require-hashes "
|
|
||||||
"manually, note that it turns on automatically when any package "
|
|
||||||
"has a hash.)"
|
|
||||||
)
|
|
||||||
|
|
||||||
def __init__(self, gotten_hash: str) -> None:
|
|
||||||
"""
|
|
||||||
:param gotten_hash: The hash of the (possibly malicious) archive we
|
|
||||||
just downloaded
|
|
||||||
"""
|
|
||||||
self.gotten_hash = gotten_hash
|
|
||||||
|
|
||||||
def body(self) -> str:
|
|
||||||
# Dodge circular import.
|
|
||||||
from pip._internal.utils.hashes import FAVORITE_HASH
|
|
||||||
|
|
||||||
package = None
|
|
||||||
if self.req:
|
|
||||||
# In the case of URL-based requirements, display the original URL
|
|
||||||
# seen in the requirements file rather than the package name,
|
|
||||||
# so the output can be directly copied into the requirements file.
|
|
||||||
package = (
|
|
||||||
self.req.original_link
|
|
||||||
if self.req.is_direct
|
|
||||||
# In case someone feeds something downright stupid
|
|
||||||
# to InstallRequirement's constructor.
|
|
||||||
else getattr(self.req, "req", None)
|
|
||||||
)
|
|
||||||
return " {} --hash={}:{}".format(
|
|
||||||
package or "unknown package", FAVORITE_HASH, self.gotten_hash
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class HashUnpinned(HashError):
|
|
||||||
"""A requirement had a hash specified but was not pinned to a specific
|
|
||||||
version."""
|
|
||||||
|
|
||||||
order = 3
|
|
||||||
head = (
|
|
||||||
"In --require-hashes mode, all requirements must have their "
|
|
||||||
"versions pinned with ==. These do not:"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class HashMismatch(HashError):
|
|
||||||
"""
|
|
||||||
Distribution file hash values don't match.
|
|
||||||
|
|
||||||
:ivar package_name: The name of the package that triggered the hash
|
|
||||||
mismatch. Feel free to write to this after the exception is raise to
|
|
||||||
improve its error message.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
order = 4
|
|
||||||
head = (
|
|
||||||
"THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS "
|
|
||||||
"FILE. If you have updated the package versions, please update "
|
|
||||||
"the hashes. Otherwise, examine the package contents carefully; "
|
|
||||||
"someone may have tampered with them."
|
|
||||||
)
|
|
||||||
|
|
||||||
def __init__(self, allowed: dict[str, list[str]], gots: dict[str, _Hash]) -> None:
|
|
||||||
"""
|
|
||||||
:param allowed: A dict of algorithm names pointing to lists of allowed
|
|
||||||
hex digests
|
|
||||||
:param gots: A dict of algorithm names pointing to hashes we
|
|
||||||
actually got from the files under suspicion
|
|
||||||
"""
|
|
||||||
self.allowed = allowed
|
|
||||||
self.gots = gots
|
|
||||||
|
|
||||||
def body(self) -> str:
|
|
||||||
return f" {self._requirement_name()}:\n{self._hash_comparison()}"
|
|
||||||
|
|
||||||
def _hash_comparison(self) -> str:
|
|
||||||
"""
|
|
||||||
Return a comparison of actual and expected hash values.
|
|
||||||
|
|
||||||
Example::
|
|
||||||
|
|
||||||
Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
|
|
||||||
or 123451234512345123451234512345123451234512345
|
|
||||||
Got bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
def hash_then_or(hash_name: str) -> chain[str]:
|
|
||||||
# For now, all the decent hashes have 6-char names, so we can get
|
|
||||||
# away with hard-coding space literals.
|
|
||||||
return chain([hash_name], repeat(" or"))
|
|
||||||
|
|
||||||
lines: list[str] = []
|
|
||||||
for hash_name, expecteds in self.allowed.items():
|
|
||||||
prefix = hash_then_or(hash_name)
|
|
||||||
lines.extend((f" Expected {next(prefix)} {e}") for e in expecteds)
|
|
||||||
lines.append(
|
|
||||||
f" Got {self.gots[hash_name].hexdigest()}\n"
|
|
||||||
)
|
|
||||||
return "\n".join(lines)
|
|
||||||
|
|
||||||
|
|
||||||
class UnsupportedPythonVersion(InstallationError):
|
|
||||||
"""Unsupported python version according to Requires-Python package
|
|
||||||
metadata."""
|
|
||||||
|
|
||||||
|
|
||||||
class ConfigurationFileCouldNotBeLoaded(ConfigurationError):
|
|
||||||
"""When there are errors while loading a configuration file"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
reason: str = "could not be loaded",
|
|
||||||
fname: str | None = None,
|
|
||||||
error: configparser.Error | None = None,
|
|
||||||
) -> None:
|
|
||||||
super().__init__(error)
|
|
||||||
self.reason = reason
|
|
||||||
self.fname = fname
|
|
||||||
self.error = error
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
if self.fname is not None:
|
|
||||||
message_part = f" in {self.fname}."
|
|
||||||
else:
|
|
||||||
assert self.error is not None
|
|
||||||
message_part = f".\n{self.error}\n"
|
|
||||||
return f"Configuration file {self.reason}{message_part}"
|
|
||||||
|
|
||||||
|
|
||||||
_DEFAULT_EXTERNALLY_MANAGED_ERROR = f"""\
|
|
||||||
The Python environment under {sys.prefix} is managed externally, and may not be
|
|
||||||
manipulated by the user. Please use specific tooling from the distributor of
|
|
||||||
the Python installation to interact with this environment instead.
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
class ExternallyManagedEnvironment(DiagnosticPipError):
|
|
||||||
"""The current environment is externally managed.
|
|
||||||
|
|
||||||
This is raised when the current environment is externally managed, as
|
|
||||||
defined by `PEP 668`_. The ``EXTERNALLY-MANAGED`` configuration is checked
|
|
||||||
and displayed when the error is bubbled up to the user.
|
|
||||||
|
|
||||||
:param error: The error message read from ``EXTERNALLY-MANAGED``.
|
|
||||||
"""
|
|
||||||
|
|
||||||
reference = "externally-managed-environment"
|
|
||||||
|
|
||||||
def __init__(self, error: str | None) -> None:
|
|
||||||
if error is None:
|
|
||||||
context = Text(_DEFAULT_EXTERNALLY_MANAGED_ERROR)
|
|
||||||
else:
|
|
||||||
context = Text(error)
|
|
||||||
super().__init__(
|
|
||||||
message="This environment is externally managed",
|
|
||||||
context=context,
|
|
||||||
note_stmt=(
|
|
||||||
"If you believe this is a mistake, please contact your "
|
|
||||||
"Python installation or OS distribution provider. "
|
|
||||||
"You can override this, at the risk of breaking your Python "
|
|
||||||
"installation or OS, by passing --break-system-packages."
|
|
||||||
),
|
|
||||||
hint_stmt=Text("See PEP 668 for the detailed specification."),
|
|
||||||
)
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def _iter_externally_managed_error_keys() -> Iterator[str]:
|
|
||||||
# LC_MESSAGES is in POSIX, but not the C standard. The most common
|
|
||||||
# platform that does not implement this category is Windows, where
|
|
||||||
# using other categories for console message localization is equally
|
|
||||||
# unreliable, so we fall back to the locale-less vendor message. This
|
|
||||||
# can always be re-evaluated when a vendor proposes a new alternative.
|
|
||||||
try:
|
|
||||||
category = locale.LC_MESSAGES
|
|
||||||
except AttributeError:
|
|
||||||
lang: str | None = None
|
|
||||||
else:
|
|
||||||
lang, _ = locale.getlocale(category)
|
|
||||||
if lang is not None:
|
|
||||||
yield f"Error-{lang}"
|
|
||||||
for sep in ("-", "_"):
|
|
||||||
before, found, _ = lang.partition(sep)
|
|
||||||
if not found:
|
|
||||||
continue
|
|
||||||
yield f"Error-{before}"
|
|
||||||
yield "Error"
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_config(
|
|
||||||
cls,
|
|
||||||
config: pathlib.Path | str,
|
|
||||||
) -> ExternallyManagedEnvironment:
|
|
||||||
parser = configparser.ConfigParser(interpolation=None)
|
|
||||||
try:
|
|
||||||
parser.read(config, encoding="utf-8")
|
|
||||||
section = parser["externally-managed"]
|
|
||||||
for key in cls._iter_externally_managed_error_keys():
|
|
||||||
with contextlib.suppress(KeyError):
|
|
||||||
return cls(section[key])
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
except (OSError, UnicodeDecodeError, configparser.ParsingError):
|
|
||||||
from pip._internal.utils._log import VERBOSE
|
|
||||||
|
|
||||||
exc_info = logger.isEnabledFor(VERBOSE)
|
|
||||||
logger.warning("Failed to read %s", config, exc_info=exc_info)
|
|
||||||
return cls(None)
|
|
||||||
|
|
||||||
|
|
||||||
class UninstallMissingRecord(DiagnosticPipError):
|
|
||||||
reference = "uninstall-no-record-file"
|
|
||||||
|
|
||||||
def __init__(self, *, distribution: BaseDistribution) -> None:
|
|
||||||
installer = distribution.installer
|
|
||||||
if not installer or installer == "pip":
|
|
||||||
dep = f"{distribution.raw_name}=={distribution.version}"
|
|
||||||
hint = Text.assemble(
|
|
||||||
"You might be able to recover from this via: ",
|
|
||||||
(f"pip install --force-reinstall --no-deps {dep}", "green"),
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
hint = Text(
|
|
||||||
f"The package was installed by {installer}. "
|
|
||||||
"You should check if it can uninstall the package."
|
|
||||||
)
|
|
||||||
|
|
||||||
super().__init__(
|
|
||||||
message=Text(f"Cannot uninstall {distribution}"),
|
|
||||||
context=(
|
|
||||||
"The package's contents are unknown: "
|
|
||||||
f"no RECORD file was found for {distribution.raw_name}."
|
|
||||||
),
|
|
||||||
hint_stmt=hint,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class LegacyDistutilsInstall(DiagnosticPipError):
|
|
||||||
reference = "uninstall-distutils-installed-package"
|
|
||||||
|
|
||||||
def __init__(self, *, distribution: BaseDistribution) -> None:
|
|
||||||
super().__init__(
|
|
||||||
message=Text(f"Cannot uninstall {distribution}"),
|
|
||||||
context=(
|
|
||||||
"It is a distutils installed project and thus we cannot accurately "
|
|
||||||
"determine which files belong to it which would lead to only a partial "
|
|
||||||
"uninstall."
|
|
||||||
),
|
|
||||||
hint_stmt=None,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class InvalidInstalledPackage(DiagnosticPipError):
|
|
||||||
reference = "invalid-installed-package"
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
*,
|
|
||||||
dist: BaseDistribution,
|
|
||||||
invalid_exc: InvalidRequirement | InvalidVersion,
|
|
||||||
) -> None:
|
|
||||||
installed_location = dist.installed_location
|
|
||||||
|
|
||||||
if isinstance(invalid_exc, InvalidRequirement):
|
|
||||||
invalid_type = "requirement"
|
|
||||||
else:
|
|
||||||
invalid_type = "version"
|
|
||||||
|
|
||||||
super().__init__(
|
|
||||||
message=Text(
|
|
||||||
f"Cannot process installed package {dist} "
|
|
||||||
+ (f"in {installed_location!r} " if installed_location else "")
|
|
||||||
+ f"because it has an invalid {invalid_type}:\n{invalid_exc.args[0]}"
|
|
||||||
),
|
|
||||||
context=(
|
|
||||||
"Starting with pip 24.1, packages with invalid "
|
|
||||||
f"{invalid_type}s can not be processed."
|
|
||||||
),
|
|
||||||
hint_stmt="To proceed this package must be uninstalled.",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class IncompleteDownloadError(DiagnosticPipError):
|
|
||||||
"""Raised when the downloader receives fewer bytes than advertised
|
|
||||||
in the Content-Length header."""
|
|
||||||
|
|
||||||
reference = "incomplete-download"
|
|
||||||
|
|
||||||
def __init__(self, download: _FileDownload) -> None:
|
|
||||||
# Dodge circular import.
|
|
||||||
from pip._internal.utils.misc import format_size
|
|
||||||
|
|
||||||
assert download.size is not None
|
|
||||||
download_status = (
|
|
||||||
f"{format_size(download.bytes_received)}/{format_size(download.size)}"
|
|
||||||
)
|
|
||||||
if download.reattempts:
|
|
||||||
retry_status = f"after {download.reattempts + 1} attempts "
|
|
||||||
hint = "Use --resume-retries to configure resume attempt limit."
|
|
||||||
else:
|
|
||||||
# Download retrying is not enabled.
|
|
||||||
retry_status = ""
|
|
||||||
hint = "Consider using --resume-retries to enable download resumption."
|
|
||||||
message = Text(
|
|
||||||
f"Download failed {retry_status}because not enough bytes "
|
|
||||||
f"were received ({download_status})"
|
|
||||||
)
|
|
||||||
|
|
||||||
super().__init__(
|
|
||||||
message=message,
|
|
||||||
context=f"URL: {download.link.redacted_url}",
|
|
||||||
hint_stmt=hint,
|
|
||||||
note_stmt="This is an issue with network connectivity, not pip.",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ResolutionTooDeepError(DiagnosticPipError):
|
|
||||||
"""Raised when the dependency resolver exceeds the maximum recursion depth."""
|
|
||||||
|
|
||||||
reference = "resolution-too-deep"
|
|
||||||
|
|
||||||
def __init__(self) -> None:
|
|
||||||
super().__init__(
|
|
||||||
message="Dependency resolution exceeded maximum depth",
|
|
||||||
context=(
|
|
||||||
"Pip cannot resolve the current dependencies as the dependency graph "
|
|
||||||
"is too complex for pip to solve efficiently."
|
|
||||||
),
|
|
||||||
hint_stmt=(
|
|
||||||
"Try adding lower bounds to constrain your dependencies, "
|
|
||||||
"for example: 'package>=2.0.0' instead of just 'package'. "
|
|
||||||
),
|
|
||||||
link="https://pip.pypa.io/en/stable/topics/dependency-resolution/#handling-resolution-too-deep-errors",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class InstallWheelBuildError(DiagnosticPipError):
|
|
||||||
reference = "failed-wheel-build-for-install"
|
|
||||||
|
|
||||||
def __init__(self, failed: list[InstallRequirement]) -> None:
|
|
||||||
super().__init__(
|
|
||||||
message=(
|
|
||||||
"Failed to build installable wheels for some "
|
|
||||||
"pyproject.toml based projects"
|
|
||||||
),
|
|
||||||
context=", ".join(r.name for r in failed), # type: ignore
|
|
||||||
hint_stmt=None,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class InvalidEggFragment(DiagnosticPipError):
|
|
||||||
reference = "invalid-egg-fragment"
|
|
||||||
|
|
||||||
def __init__(self, link: Link, fragment: str) -> None:
|
|
||||||
hint = ""
|
|
||||||
if ">" in fragment or "=" in fragment or "<" in fragment:
|
|
||||||
hint = (
|
|
||||||
"Version specifiers are silently ignored for URL references. "
|
|
||||||
"Remove them. "
|
|
||||||
)
|
|
||||||
if "[" in fragment and "]" in fragment:
|
|
||||||
hint += "Try using the Direct URL requirement syntax: 'name[extra] @ URL'"
|
|
||||||
|
|
||||||
if not hint:
|
|
||||||
hint = "Egg fragments can only be a valid project name."
|
|
||||||
|
|
||||||
super().__init__(
|
|
||||||
message=f"The '{escape(fragment)}' egg fragment is invalid",
|
|
||||||
context=f"from '{escape(str(link))}'",
|
|
||||||
hint_stmt=escape(hint),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class BuildDependencyInstallError(DiagnosticPipError):
|
|
||||||
"""Raised when build dependencies cannot be installed."""
|
|
||||||
|
|
||||||
reference = "failed-build-dependency-install"
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
req: InstallRequirement | None,
|
|
||||||
build_reqs: Iterable[str],
|
|
||||||
*,
|
|
||||||
cause: Exception,
|
|
||||||
log_lines: list[str] | None,
|
|
||||||
) -> None:
|
|
||||||
if isinstance(cause, PipError):
|
|
||||||
note = "This is likely not a problem with pip."
|
|
||||||
else:
|
|
||||||
note = (
|
|
||||||
"pip crashed unexpectedly. Please file an issue on pip's issue "
|
|
||||||
"tracker: https://github.com/pypa/pip/issues/new"
|
|
||||||
)
|
|
||||||
|
|
||||||
if log_lines is None:
|
|
||||||
# No logs are available, they must have been printed earlier.
|
|
||||||
context = Text("See above for more details.")
|
|
||||||
else:
|
|
||||||
if isinstance(cause, PipError):
|
|
||||||
log_lines.append(f"ERROR: {cause}")
|
|
||||||
else:
|
|
||||||
# Split rendered error into real lines without trailing newlines.
|
|
||||||
log_lines.extend(
|
|
||||||
"".join(traceback.format_exception(cause)).splitlines()
|
|
||||||
)
|
|
||||||
|
|
||||||
context = Text.assemble(
|
|
||||||
f"Installing {' '.join(build_reqs)}\n",
|
|
||||||
(f"[{len(log_lines)} lines of output]\n", "red"),
|
|
||||||
"\n".join(log_lines),
|
|
||||||
("\n[end of output]", "red"),
|
|
||||||
)
|
|
||||||
|
|
||||||
message = Text("Cannot install build dependencies", "green")
|
|
||||||
if req:
|
|
||||||
message += Text(f" for {req}")
|
|
||||||
super().__init__(
|
|
||||||
message=message, context=context, hint_stmt=None, note_stmt=note
|
|
||||||
)
|
|
||||||
@@ -12,21 +12,27 @@ import json
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
from collections.abc import Iterable, MutableMapping, Sequence
|
from collections.abc import Callable, Iterable, MutableMapping, Sequence
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
from optparse import Values
|
from optparse import Values
|
||||||
from typing import (
|
from typing import (
|
||||||
Callable,
|
|
||||||
NamedTuple,
|
NamedTuple,
|
||||||
Protocol,
|
Protocol,
|
||||||
)
|
)
|
||||||
|
|
||||||
from pip._vendor import requests
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
from pip._vendor.requests import Response
|
from pip._vendor.requests import Response
|
||||||
from pip._vendor.requests.exceptions import RetryError, SSLError
|
from pip._vendor.requests.exceptions import RetryError
|
||||||
|
|
||||||
from pip._internal.exceptions import NetworkConnectionError
|
from pip._internal.exceptions import (
|
||||||
|
ConnectionFailedError,
|
||||||
|
ConnectionTimeoutError,
|
||||||
|
NetworkConnectionError,
|
||||||
|
ProxyConnectionError,
|
||||||
|
SSLMissingError,
|
||||||
|
SSLVerificationError,
|
||||||
|
)
|
||||||
from pip._internal.models.link import Link
|
from pip._internal.models.link import Link
|
||||||
from pip._internal.models.search_scope import SearchScope
|
from pip._internal.models.search_scope import SearchScope
|
||||||
from pip._internal.network.session import PipSession
|
from pip._internal.network.session import PipSession
|
||||||
@@ -80,7 +86,7 @@ def _ensure_api_header(response: Response) -> None:
|
|||||||
):
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
raise _NotAPIContent(content_type, response.request.method)
|
raise _NotAPIContent(content_type, response.request.method) # type: ignore[arg-type]
|
||||||
|
|
||||||
|
|
||||||
class _NotHTTP(Exception):
|
class _NotHTTP(Exception):
|
||||||
@@ -105,7 +111,11 @@ def _ensure_api_response(url: str, session: PipSession) -> None:
|
|||||||
_ensure_api_header(resp)
|
_ensure_api_header(resp)
|
||||||
|
|
||||||
|
|
||||||
def _get_simple_response(url: str, session: PipSession) -> Response:
|
def _get_simple_response(
|
||||||
|
url: str,
|
||||||
|
session: PipSession,
|
||||||
|
force_revalidate: bool = False,
|
||||||
|
) -> Response:
|
||||||
"""Access an Simple API response with GET, and return the response.
|
"""Access an Simple API response with GET, and return the response.
|
||||||
|
|
||||||
This consists of three parts:
|
This consists of three parts:
|
||||||
@@ -123,32 +133,24 @@ def _get_simple_response(url: str, session: PipSession) -> Response:
|
|||||||
|
|
||||||
logger.debug("Getting page %s", redact_auth_from_url(url))
|
logger.debug("Getting page %s", redact_auth_from_url(url))
|
||||||
|
|
||||||
resp = session.get(
|
headers = {
|
||||||
url,
|
"Accept": ", ".join(
|
||||||
headers={
|
[
|
||||||
"Accept": ", ".join(
|
"application/vnd.pypi.simple.v1+json",
|
||||||
[
|
"application/vnd.pypi.simple.v1+html; q=0.1",
|
||||||
"application/vnd.pypi.simple.v1+json",
|
"text/html; q=0.01",
|
||||||
"application/vnd.pypi.simple.v1+html; q=0.1",
|
]
|
||||||
"text/html; q=0.01",
|
),
|
||||||
]
|
}
|
||||||
),
|
|
||||||
# We don't want to blindly returned cached data for
|
if force_revalidate:
|
||||||
# /simple/, because authors generally expecting that
|
# Using max-age=0 rather than no-cache still supports conditional
|
||||||
# twine upload && pip install will function, but if
|
# requests, minimizing traffic when the page hasn't changed.
|
||||||
# they've done a pip install in the last ~10 minutes
|
# See pypa/pip#5670.
|
||||||
# it won't. Thus by setting this to zero we will not
|
logger.debug("Refreshing package index response.")
|
||||||
# blindly use any cached data, however the benefit of
|
headers["Cache-Control"] = "max-age=0"
|
||||||
# using max-age=0 instead of no-cache, is that we will
|
|
||||||
# still support conditional requests, so we will still
|
resp = session.get(url, headers=headers)
|
||||||
# minimize traffic sent in cases where the page hasn't
|
|
||||||
# changed at all, we will just always incur the round
|
|
||||||
# trip for the conditional GET now instead of only
|
|
||||||
# once per 10 minutes.
|
|
||||||
# For more information, please see pypa/pip#5670.
|
|
||||||
"Cache-Control": "max-age=0",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
raise_for_status(resp)
|
raise_for_status(resp)
|
||||||
|
|
||||||
# The check for archives above only works if the url ends with
|
# The check for archives above only works if the url ends with
|
||||||
@@ -316,7 +318,12 @@ def _make_index_content(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _get_index_content(link: Link, *, session: PipSession) -> IndexContent | None:
|
def _get_index_content(
|
||||||
|
link: Link,
|
||||||
|
*,
|
||||||
|
session: PipSession,
|
||||||
|
force_revalidate: bool = False,
|
||||||
|
) -> IndexContent | None:
|
||||||
url = link.url.split("#", 1)[0]
|
url = link.url.split("#", 1)[0]
|
||||||
|
|
||||||
# Check for VCS schemes that do not support lookup as web pages.
|
# Check for VCS schemes that do not support lookup as web pages.
|
||||||
@@ -343,7 +350,9 @@ def _get_index_content(link: Link, *, session: PipSession) -> IndexContent | Non
|
|||||||
logger.debug(" file: URL is directory, getting %s", url)
|
logger.debug(" file: URL is directory, getting %s", url)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
resp = _get_simple_response(url, session=session)
|
resp = _get_simple_response(
|
||||||
|
url, session=session, force_revalidate=force_revalidate
|
||||||
|
)
|
||||||
except _NotHTTP:
|
except _NotHTTP:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Skipping page %s because it looks like an archive, and cannot "
|
"Skipping page %s because it looks like an archive, and cannot "
|
||||||
@@ -359,18 +368,17 @@ def _get_index_content(link: Link, *, session: PipSession) -> IndexContent | Non
|
|||||||
exc.request_desc,
|
exc.request_desc,
|
||||||
exc.content_type,
|
exc.content_type,
|
||||||
)
|
)
|
||||||
except NetworkConnectionError as exc:
|
except (RetryError, NetworkConnectionError) as exc:
|
||||||
_handle_get_simple_fail(link, exc)
|
_handle_get_simple_fail(link, exc)
|
||||||
except RetryError as exc:
|
except (SSLVerificationError, SSLMissingError) as exc:
|
||||||
_handle_get_simple_fail(link, exc)
|
reason = f"There was a problem confirming the ssl certificate: {exc.context}"
|
||||||
except SSLError as exc:
|
|
||||||
reason = "There was a problem confirming the ssl certificate: "
|
|
||||||
reason += str(exc)
|
|
||||||
_handle_get_simple_fail(link, reason, meth=logger.info)
|
_handle_get_simple_fail(link, reason, meth=logger.info)
|
||||||
except requests.ConnectionError as exc:
|
except ConnectionFailedError as exc:
|
||||||
_handle_get_simple_fail(link, f"connection error: {exc}")
|
_handle_get_simple_fail(link, f"connection error: {exc.context}")
|
||||||
except requests.Timeout:
|
except ProxyConnectionError as exc:
|
||||||
_handle_get_simple_fail(link, "timed out")
|
_handle_get_simple_fail(link, f"proxy connection error: {exc.context}")
|
||||||
|
except ConnectionTimeoutError as exc:
|
||||||
|
_handle_get_simple_fail(link, str(exc.context))
|
||||||
else:
|
else:
|
||||||
return _make_index_content(resp, cache_link_parsing=link.cache_link_parsing)
|
return _make_index_content(resp, cache_link_parsing=link.cache_link_parsing)
|
||||||
return None
|
return None
|
||||||
@@ -435,11 +443,25 @@ class LinkCollector:
|
|||||||
def find_links(self) -> list[str]:
|
def find_links(self) -> list[str]:
|
||||||
return self.search_scope.find_links
|
return self.search_scope.find_links
|
||||||
|
|
||||||
def fetch_response(self, location: Link) -> IndexContent | None:
|
def fetch_response(
|
||||||
|
self, location: Link, package_name: str | None = None
|
||||||
|
) -> IndexContent | None:
|
||||||
"""
|
"""
|
||||||
Fetch an HTML page containing package links.
|
Fetch an HTML page containing package links.
|
||||||
"""
|
"""
|
||||||
return _get_index_content(location, session=self.session)
|
# By default we may return cached /simple/ responses. Users can force
|
||||||
|
# revalidation to ensure newly uploaded distributions become visible
|
||||||
|
# immediately after publication. See pypa/pip#5670.
|
||||||
|
force_revalidate = self.session.refresh_package
|
||||||
|
should_force_revalidate = ":all:" in force_revalidate or (
|
||||||
|
package_name is not None
|
||||||
|
and canonicalize_name(package_name) in force_revalidate
|
||||||
|
)
|
||||||
|
return _get_index_content(
|
||||||
|
location,
|
||||||
|
session=self.session,
|
||||||
|
force_revalidate=should_force_revalidate,
|
||||||
|
)
|
||||||
|
|
||||||
def collect_sources(
|
def collect_sources(
|
||||||
self,
|
self,
|
||||||
|
|||||||
@@ -12,14 +12,12 @@ from collections.abc import Iterable
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import (
|
from typing import (
|
||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
Optional,
|
|
||||||
Union,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from pip._vendor.packaging import specifiers
|
from pip._vendor.packaging import specifiers
|
||||||
from pip._vendor.packaging.tags import Tag
|
from pip._vendor.packaging.tags import Tag
|
||||||
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
|
from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
|
||||||
from pip._vendor.packaging.version import InvalidVersion, Version, _BaseVersion
|
from pip._vendor.packaging.version import InvalidVersion, _BaseVersion
|
||||||
from pip._vendor.packaging.version import parse as parse_version
|
from pip._vendor.packaging.version import parse as parse_version
|
||||||
|
|
||||||
from pip._internal.exceptions import (
|
from pip._internal.exceptions import (
|
||||||
@@ -49,15 +47,15 @@ from pip._internal.utils.packaging import check_requires_python
|
|||||||
from pip._internal.utils.unpacking import SUPPORTED_EXTENSIONS
|
from pip._internal.utils.unpacking import SUPPORTED_EXTENSIONS
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing_extensions import TypeGuard
|
from typing import TypeGuard
|
||||||
|
|
||||||
__all__ = ["FormatControl", "BestCandidateResult", "PackageFinder"]
|
__all__ = ["FormatControl", "BestCandidateResult", "PackageFinder"]
|
||||||
|
|
||||||
|
|
||||||
logger = getLogger(__name__)
|
logger = getLogger(__name__)
|
||||||
|
|
||||||
BuildTag = Union[tuple[()], tuple[int, str]]
|
BuildTag = tuple[()] | tuple[int, str]
|
||||||
CandidateSortingKey = tuple[int, int, int, _BaseVersion, Optional[int], BuildTag]
|
CandidateSortingKey = tuple[int, int, int, _BaseVersion, int | None, BuildTag]
|
||||||
|
|
||||||
|
|
||||||
def _check_link_requires_python(
|
def _check_link_requires_python(
|
||||||
@@ -137,7 +135,7 @@ class LinkEvaluator:
|
|||||||
formats: frozenset[str],
|
formats: frozenset[str],
|
||||||
target_python: TargetPython,
|
target_python: TargetPython,
|
||||||
allow_yanked: bool,
|
allow_yanked: bool,
|
||||||
ignore_requires_python: bool | None = None,
|
ignore_requires_python: bool = False,
|
||||||
uploaded_prior_to: datetime.datetime | None = None,
|
uploaded_prior_to: datetime.datetime | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -159,8 +157,6 @@ class LinkEvaluator:
|
|||||||
:param uploaded_prior_to: If set, only allow links uploaded prior to
|
:param uploaded_prior_to: If set, only allow links uploaded prior to
|
||||||
the given datetime.
|
the given datetime.
|
||||||
"""
|
"""
|
||||||
if ignore_requires_python is None:
|
|
||||||
ignore_requires_python = False
|
|
||||||
|
|
||||||
self._allow_yanked = allow_yanked
|
self._allow_yanked = allow_yanked
|
||||||
self._canonical_name = canonical_name
|
self._canonical_name = canonical_name
|
||||||
@@ -493,7 +489,6 @@ class CandidateEvaluator:
|
|||||||
else:
|
else:
|
||||||
allow_prereleases = None
|
allow_prereleases = None
|
||||||
specifier = self._specifier
|
specifier = self._specifier
|
||||||
|
|
||||||
# When using the pkg_resources backend we turn the version object into
|
# When using the pkg_resources backend we turn the version object into
|
||||||
# a str here because otherwise when we're debundled but setuptools isn't,
|
# a str here because otherwise when we're debundled but setuptools isn't,
|
||||||
# Python will see packaging.version.Version and
|
# Python will see packaging.version.Version and
|
||||||
@@ -501,22 +496,17 @@ class CandidateEvaluator:
|
|||||||
# types. This way we'll use a str as a common data interchange
|
# types. This way we'll use a str as a common data interchange
|
||||||
# format. If we stop using the pkg_resources provided specifier
|
# format. If we stop using the pkg_resources provided specifier
|
||||||
# and start using our own, we can drop the cast to str().
|
# and start using our own, we can drop the cast to str().
|
||||||
if select_backend().NAME == "pkg_resources":
|
applicable_candidates = specifier.filter(
|
||||||
candidates_and_versions: list[
|
candidates,
|
||||||
tuple[InstallationCandidate, str | Version]
|
prereleases=allow_prereleases,
|
||||||
] = [(c, str(c.version)) for c in candidates]
|
key=lambda c: (
|
||||||
else:
|
str(c.version)
|
||||||
candidates_and_versions = [(c, c.version) for c in candidates]
|
if select_backend().NAME == "pkg_resources"
|
||||||
versions = set(
|
else c.version
|
||||||
specifier.filter(
|
),
|
||||||
(v for _, v in candidates_and_versions),
|
|
||||||
prereleases=allow_prereleases,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
applicable_candidates = [c for c, v in candidates_and_versions if v in versions]
|
|
||||||
filtered_applicable_candidates = filter_unallowed_hashes(
|
filtered_applicable_candidates = filter_unallowed_hashes(
|
||||||
candidates=applicable_candidates,
|
candidates=list(applicable_candidates),
|
||||||
hashes=self._hashes,
|
hashes=self._hashes,
|
||||||
project_name=self._project_name,
|
project_name=self._project_name,
|
||||||
)
|
)
|
||||||
@@ -633,7 +623,7 @@ class PackageFinder:
|
|||||||
allow_yanked: bool,
|
allow_yanked: bool,
|
||||||
format_control: FormatControl | None = None,
|
format_control: FormatControl | None = None,
|
||||||
candidate_prefs: CandidatePreferences | None = None,
|
candidate_prefs: CandidatePreferences | None = None,
|
||||||
ignore_requires_python: bool | None = None,
|
ignore_requires_python: bool = False,
|
||||||
uploaded_prior_to: datetime.datetime | None = None,
|
uploaded_prior_to: datetime.datetime | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -660,8 +650,10 @@ class PackageFinder:
|
|||||||
|
|
||||||
self.format_control = format_control
|
self.format_control = format_control
|
||||||
|
|
||||||
# These are boring links that have already been logged somehow.
|
# Collects the detail strings for links skipped due to Requires-Python
|
||||||
self._logged_links: set[tuple[Link, LinkType, str]] = set()
|
# incompatibility. Used by requires_python_skipped_reasons() to build
|
||||||
|
# the error message when resolution fails.
|
||||||
|
self._requires_python_skipped: set[str] = set()
|
||||||
|
|
||||||
# Cache of the result of finding candidates
|
# Cache of the result of finding candidates
|
||||||
self._all_candidates: dict[str, list[InstallationCandidate]] = {}
|
self._all_candidates: dict[str, list[InstallationCandidate]] = {}
|
||||||
@@ -670,6 +662,9 @@ class PackageFinder:
|
|||||||
BestCandidateResult,
|
BestCandidateResult,
|
||||||
] = {}
|
] = {}
|
||||||
|
|
||||||
|
# projects for which a link is locked from a pylock
|
||||||
|
self._locked_links: dict[NormalizedName, Link] = {}
|
||||||
|
|
||||||
# Don't include an allow_yanked default value to make sure each call
|
# Don't include an allow_yanked default value to make sure each call
|
||||||
# site considers whether yanked releases are allowed. This also causes
|
# site considers whether yanked releases are allowed. This also causes
|
||||||
# that decision to be made explicit in the calling code, which helps
|
# that decision to be made explicit in the calling code, which helps
|
||||||
@@ -730,10 +725,18 @@ class PackageFinder:
|
|||||||
def index_urls(self) -> list[str]:
|
def index_urls(self) -> list[str]:
|
||||||
return self.search_scope.index_urls
|
return self.search_scope.index_urls
|
||||||
|
|
||||||
|
@property
|
||||||
|
def refresh_package(self) -> set[str]:
|
||||||
|
return self._link_collector.session.refresh_package
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def proxy(self) -> str | None:
|
def proxy(self) -> str | None:
|
||||||
return self._link_collector.session.pip_proxy
|
return self._link_collector.session.pip_proxy
|
||||||
|
|
||||||
|
@property
|
||||||
|
def no_proxy_env(self) -> bool:
|
||||||
|
return self._link_collector.session.pip_no_proxy_env
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def trusted_hosts(self) -> Iterable[str]:
|
def trusted_hosts(self) -> Iterable[str]:
|
||||||
for host_port in self._link_collector.session.pip_trusted_origins:
|
for host_port in self._link_collector.session.pip_trusted_origins:
|
||||||
@@ -772,12 +775,7 @@ class PackageFinder:
|
|||||||
return self._uploaded_prior_to
|
return self._uploaded_prior_to
|
||||||
|
|
||||||
def requires_python_skipped_reasons(self) -> list[str]:
|
def requires_python_skipped_reasons(self) -> list[str]:
|
||||||
reasons = {
|
return sorted(self._requires_python_skipped)
|
||||||
detail
|
|
||||||
for _, result, detail in self._logged_links
|
|
||||||
if result == LinkType.requires_python_mismatch
|
|
||||||
}
|
|
||||||
return sorted(reasons)
|
|
||||||
|
|
||||||
def make_link_evaluator(self, project_name: str) -> LinkEvaluator:
|
def make_link_evaluator(self, project_name: str) -> LinkEvaluator:
|
||||||
canonical_name = canonicalize_name(project_name)
|
canonical_name = canonicalize_name(project_name)
|
||||||
@@ -810,12 +808,11 @@ class PackageFinder:
|
|||||||
return no_eggs + eggs
|
return no_eggs + eggs
|
||||||
|
|
||||||
def _log_skipped_link(self, link: Link, result: LinkType, detail: str) -> None:
|
def _log_skipped_link(self, link: Link, result: LinkType, detail: str) -> None:
|
||||||
entry = (link, result, detail)
|
# Put the link at the end so the reason is more visible and because
|
||||||
if entry not in self._logged_links:
|
# the link string is usually very long.
|
||||||
# Put the link at the end so the reason is more visible and because
|
logger.debug("Skipping link: %s: %s", detail, link)
|
||||||
# the link string is usually very long.
|
if result == LinkType.requires_python_mismatch:
|
||||||
logger.debug("Skipping link: %s: %s", detail, link)
|
self._requires_python_skipped.add(detail)
|
||||||
self._logged_links.add(entry)
|
|
||||||
|
|
||||||
def get_install_candidate(
|
def get_install_candidate(
|
||||||
self, link_evaluator: LinkEvaluator, link: Link
|
self, link_evaluator: LinkEvaluator, link: Link
|
||||||
@@ -863,7 +860,9 @@ class PackageFinder:
|
|||||||
"Fetching project page and analyzing links: %s",
|
"Fetching project page and analyzing links: %s",
|
||||||
project_url,
|
project_url,
|
||||||
)
|
)
|
||||||
index_response = self._link_collector.fetch_response(project_url)
|
index_response = self._link_collector.fetch_response(
|
||||||
|
project_url, package_name=link_evaluator.project_name
|
||||||
|
)
|
||||||
if index_response is None:
|
if index_response is None:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
@@ -880,7 +879,8 @@ class PackageFinder:
|
|||||||
def find_all_candidates(self, project_name: str) -> list[InstallationCandidate]:
|
def find_all_candidates(self, project_name: str) -> list[InstallationCandidate]:
|
||||||
"""Find all available InstallationCandidate for project_name
|
"""Find all available InstallationCandidate for project_name
|
||||||
|
|
||||||
This checks index_urls and find_links.
|
This checks index_urls and find_links, unless a locked link is known
|
||||||
|
for that project.
|
||||||
All versions found are returned as an InstallationCandidate list.
|
All versions found are returned as an InstallationCandidate list.
|
||||||
|
|
||||||
See LinkEvaluator.evaluate_link() for details on which files
|
See LinkEvaluator.evaluate_link() for details on which files
|
||||||
@@ -891,6 +891,23 @@ class PackageFinder:
|
|||||||
|
|
||||||
link_evaluator = self.make_link_evaluator(project_name)
|
link_evaluator = self.make_link_evaluator(project_name)
|
||||||
|
|
||||||
|
if locked_link := self._locked_links.get(canonicalize_name(project_name)):
|
||||||
|
# If a locked link is known for that project, do not check
|
||||||
|
# index_urls nor find_links. We don't use get_install_candidate here,
|
||||||
|
# because if a locked link is unsupported (due to format control,
|
||||||
|
# release control or otherwise), we want to error out immediately
|
||||||
|
# instead of ignoring it.
|
||||||
|
result, detail = link_evaluator.evaluate_link(locked_link)
|
||||||
|
if result != LinkType.candidate:
|
||||||
|
raise InstallationError(
|
||||||
|
f"Could not install locked package {project_name!r} "
|
||||||
|
f"from {locked_link.comes_from!r}: {detail}"
|
||||||
|
)
|
||||||
|
self._all_candidates[project_name] = [
|
||||||
|
InstallationCandidate(project_name, detail, locked_link, locked=True)
|
||||||
|
]
|
||||||
|
return self._all_candidates[project_name]
|
||||||
|
|
||||||
collected_sources = self._link_collector.collect_sources(
|
collected_sources = self._link_collector.collect_sources(
|
||||||
project_name=project_name,
|
project_name=project_name,
|
||||||
candidates_from_page=functools.partial(
|
candidates_from_page=functools.partial(
|
||||||
@@ -1028,16 +1045,16 @@ class PackageFinder:
|
|||||||
)
|
)
|
||||||
if allows_pre is False:
|
if allows_pre is False:
|
||||||
version_type = "final version"
|
version_type = "final version"
|
||||||
|
req_disp = req.format_without_marker()
|
||||||
logger.critical(
|
logger.critical(
|
||||||
"Could not find a %s that satisfies the requirement %s "
|
"Could not find a %s that satisfies the requirement %s "
|
||||||
"(from versions: %s)",
|
"(from versions: %s)",
|
||||||
version_type,
|
version_type,
|
||||||
req,
|
req_disp,
|
||||||
_format_versions(best_candidate_result.all_candidates),
|
_format_versions(best_candidate_result.all_candidates),
|
||||||
)
|
)
|
||||||
|
|
||||||
raise DistributionNotFound(f"No matching distribution found for {req}")
|
raise DistributionNotFound(f"No matching distribution found for {req_disp}")
|
||||||
|
|
||||||
def _should_install_candidate(
|
def _should_install_candidate(
|
||||||
candidate: InstallationCandidate | None,
|
candidate: InstallationCandidate | None,
|
||||||
@@ -1080,6 +1097,16 @@ class PackageFinder:
|
|||||||
)
|
)
|
||||||
raise BestVersionAlreadyInstalled
|
raise BestVersionAlreadyInstalled
|
||||||
|
|
||||||
|
def add_locked_link(self, project_name: NormalizedName, locked_link: Link) -> None:
|
||||||
|
assert not self._all_candidates
|
||||||
|
if project_name in self._locked_links:
|
||||||
|
raise InstallationError(
|
||||||
|
f"Multiple locked links provided for {project_name}: "
|
||||||
|
f"{self._locked_links[project_name]} and {locked_link}"
|
||||||
|
)
|
||||||
|
|
||||||
|
self._locked_links[project_name] = locked_link
|
||||||
|
|
||||||
|
|
||||||
def _find_name_version_sep(fragment: str, canonical_name: str) -> int:
|
def _find_name_version_sep(fragment: str, canonical_name: str) -> int:
|
||||||
"""Find the separator's index based on the package's canonical name.
|
"""Find the separator's index based on the package's canonical name.
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import logging
|
|||||||
import mimetypes
|
import mimetypes
|
||||||
import os
|
import os
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from collections.abc import Iterable
|
from collections.abc import Callable, Iterable
|
||||||
from typing import Callable
|
|
||||||
|
|
||||||
from pip._vendor.packaging.utils import (
|
from pip._vendor.packaging.utils import (
|
||||||
InvalidSdistFilename,
|
InvalidSdistFilename,
|
||||||
|
|||||||
@@ -41,13 +41,11 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
_PLATLIBDIR: str = getattr(sys, "platlibdir", "lib")
|
_PLATLIBDIR: str = getattr(sys, "platlibdir", "lib")
|
||||||
|
|
||||||
_USE_SYSCONFIG_DEFAULT = sys.version_info >= (3, 10)
|
|
||||||
|
|
||||||
|
|
||||||
def _should_use_sysconfig() -> bool:
|
def _should_use_sysconfig() -> bool:
|
||||||
"""This function determines the value of _USE_SYSCONFIG.
|
"""This function determines the value of _USE_SYSCONFIG.
|
||||||
|
|
||||||
By default, pip uses sysconfig on Python 3.10+.
|
By default, pip uses sysconfig.
|
||||||
But Python distributors can override this decision by setting:
|
But Python distributors can override this decision by setting:
|
||||||
sysconfig._PIP_USE_SYSCONFIG = True / False
|
sysconfig._PIP_USE_SYSCONFIG = True / False
|
||||||
Rationale in https://github.com/pypa/pip/issues/10647
|
Rationale in https://github.com/pypa/pip/issues/10647
|
||||||
@@ -55,7 +53,7 @@ def _should_use_sysconfig() -> bool:
|
|||||||
This is a function for testability, but should be constant during any one
|
This is a function for testability, but should be constant during any one
|
||||||
run.
|
run.
|
||||||
"""
|
"""
|
||||||
return bool(getattr(sysconfig, "_PIP_USE_SYSCONFIG", _USE_SYSCONFIG_DEFAULT))
|
return bool(getattr(sysconfig, "_PIP_USE_SYSCONFIG", True))
|
||||||
|
|
||||||
|
|
||||||
_USE_SYSCONFIG = _should_use_sysconfig()
|
_USE_SYSCONFIG = _should_use_sysconfig()
|
||||||
@@ -68,10 +66,10 @@ if not _USE_SYSCONFIG:
|
|||||||
|
|
||||||
# Be noisy about incompatibilities if this platforms "should" be using
|
# Be noisy about incompatibilities if this platforms "should" be using
|
||||||
# sysconfig, but is explicitly opting out and using distutils instead.
|
# sysconfig, but is explicitly opting out and using distutils instead.
|
||||||
if _USE_SYSCONFIG_DEFAULT and not _USE_SYSCONFIG:
|
if _USE_SYSCONFIG:
|
||||||
_MISMATCH_LEVEL = logging.WARNING
|
|
||||||
else:
|
|
||||||
_MISMATCH_LEVEL = logging.DEBUG
|
_MISMATCH_LEVEL = logging.DEBUG
|
||||||
|
else:
|
||||||
|
_MISMATCH_LEVEL = logging.WARNING
|
||||||
|
|
||||||
|
|
||||||
def _looks_like_bpo_44860() -> bool:
|
def _looks_like_bpo_44860() -> bool:
|
||||||
@@ -281,7 +279,7 @@ def get_scheme(
|
|||||||
if k == "platlib" and _looks_like_red_hat_lib():
|
if k == "platlib" and _looks_like_red_hat_lib():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# On Python 3.9+, sysconfig's posix_user scheme sets platlib against
|
# sysconfig's posix_user scheme sets platlib against
|
||||||
# sys.platlibdir, but distutils's unix_user incorrectly continues
|
# sys.platlibdir, but distutils's unix_user incorrectly continues
|
||||||
# using the same $usersite for both platlib and purelib. This creates a
|
# using the same $usersite for both platlib and purelib. This creates a
|
||||||
# mismatch when sys.platlibdir is not "lib".
|
# mismatch when sys.platlibdir is not "lib".
|
||||||
|
|||||||
@@ -20,11 +20,10 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from distutils.cmd import Command as DistutilsCommand
|
from distutils.cmd import Command as DistutilsCommand
|
||||||
from distutils.command.install import SCHEME_KEYS
|
|
||||||
from distutils.command.install import install as distutils_install_command
|
from distutils.command.install import install as distutils_install_command
|
||||||
from distutils.sysconfig import get_python_lib
|
from distutils.sysconfig import get_python_lib
|
||||||
|
|
||||||
from pip._internal.models.scheme import Scheme
|
from pip._internal.models.scheme import SCHEME_KEYS, Scheme
|
||||||
from pip._internal.utils.compat import WINDOWS
|
from pip._internal.utils.compat import WINDOWS
|
||||||
from pip._internal.utils.virtualenv import running_under_virtualenv
|
from pip._internal.utils.virtualenv import running_under_virtualenv
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import sysconfig
|
import sysconfig
|
||||||
from typing import Callable
|
from collections.abc import Callable
|
||||||
|
|
||||||
from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid
|
from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid
|
||||||
from pip._internal.models.scheme import SCHEME_KEYS, Scheme
|
from pip._internal.models.scheme import SCHEME_KEYS, Scheme
|
||||||
@@ -158,6 +158,14 @@ def get_scheme(
|
|||||||
else:
|
else:
|
||||||
scheme_name = _infer_prefix()
|
scheme_name = _infer_prefix()
|
||||||
|
|
||||||
|
# Special case: When installing into a custom prefix, use posix_prefix
|
||||||
|
# instead of posix_local because it should *only* be used to redirecting
|
||||||
|
# to /usr/local for system packager installs. Notably, posix_local is used
|
||||||
|
# on Debian and its derivatives.
|
||||||
|
# See also: https://discuss.python.org/t/18240
|
||||||
|
if prefix is not None and scheme_name == "posix_local":
|
||||||
|
scheme_name = "posix_prefix"
|
||||||
|
|
||||||
# Special case: When installing into a custom prefix, use posix_prefix
|
# Special case: When installing into a custom prefix, use posix_prefix
|
||||||
# instead of osx_framework_library. See _should_use_osx_framework_prefix()
|
# instead of osx_framework_library. See _should_use_osx_framework_prefix()
|
||||||
# docstring for details.
|
# docstring for details.
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ def change_root(new_root: str, pathname: str) -> str:
|
|||||||
return os.path.join(new_root, pathname[1:])
|
return os.path.join(new_root, pathname[1:])
|
||||||
|
|
||||||
elif os.name == "nt":
|
elif os.name == "nt":
|
||||||
(drive, path) = os.path.splitdrive(pathname)
|
drive, path = os.path.splitdrive(pathname)
|
||||||
if path[0] == "\\":
|
if path[0] == "\\":
|
||||||
path = path[1:]
|
path = path[1:]
|
||||||
return os.path.join(new_root, path)
|
return os.path.join(new_root, path)
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ def _emit_pkg_resources_deprecation_if_needed() -> None:
|
|||||||
"to use the default importlib.metadata backend, "
|
"to use the default importlib.metadata backend, "
|
||||||
"by unsetting the _PIP_USE_IMPORTLIB_METADATA environment variable"
|
"by unsetting the _PIP_USE_IMPORTLIB_METADATA environment variable"
|
||||||
),
|
),
|
||||||
gone_in="26.3",
|
gone_in="27.0",
|
||||||
issue=13317,
|
issue=13317,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ from typing import (
|
|||||||
Any,
|
Any,
|
||||||
NamedTuple,
|
NamedTuple,
|
||||||
Protocol,
|
Protocol,
|
||||||
Union,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from pip._vendor.packaging.requirements import Requirement
|
from pip._vendor.packaging.requirements import Requirement
|
||||||
@@ -29,14 +28,21 @@ from pip._internal.models.direct_url import (
|
|||||||
DirectUrl,
|
DirectUrl,
|
||||||
DirectUrlValidationError,
|
DirectUrlValidationError,
|
||||||
)
|
)
|
||||||
from pip._internal.utils.compat import stdlib_pkgs # TODO: Move definition here.
|
|
||||||
from pip._internal.utils.egg_link import egg_link_path_from_sys_path
|
from pip._internal.utils.egg_link import egg_link_path_from_sys_path
|
||||||
from pip._internal.utils.misc import is_local, normalize_path
|
from pip._internal.utils.misc import is_local, normalize_path
|
||||||
from pip._internal.utils.urls import url_to_path
|
from pip._internal.utils.urls import url_to_path
|
||||||
|
|
||||||
from ._json import msg_to_json
|
from ._json import msg_to_json
|
||||||
|
|
||||||
InfoPath = Union[str, pathlib.PurePath]
|
# packages in the stdlib that may have installation metadata, but should not be
|
||||||
|
# considered 'installed'. this theoretically could be determined based on
|
||||||
|
# dist.location (py27:`sysconfig.get_paths()['stdlib']`,
|
||||||
|
# py26:sysconfig.get_config_vars('LIBDEST')), but fear platform variation may
|
||||||
|
# make this ineffective, so hard-coding
|
||||||
|
stdlib_pkgs = {"python", "wsgiref", "argparse"}
|
||||||
|
|
||||||
|
|
||||||
|
InfoPath = str | pathlib.PurePath
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -152,14 +158,13 @@ class BaseDistribution(Protocol):
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
@property
|
@functools.cached_property
|
||||||
def editable_project_location(self) -> str | None:
|
def editable_project_location(self) -> str | None:
|
||||||
"""The project location for editable distributions.
|
"""The project location for editable distributions.
|
||||||
|
|
||||||
This is the directory where pyproject.toml or setup.py is located.
|
This is the directory where pyproject.toml or setup.py is located.
|
||||||
None if the distribution is not installed in editable mode.
|
None if the distribution is not installed in editable mode.
|
||||||
"""
|
"""
|
||||||
# TODO: this property is relatively costly to compute, memoize it ?
|
|
||||||
direct_url = self.direct_url
|
direct_url = self.direct_url
|
||||||
if direct_url:
|
if direct_url:
|
||||||
if direct_url.is_local_editable():
|
if direct_url.is_local_editable():
|
||||||
@@ -617,11 +622,29 @@ class BaseEnvironment:
|
|||||||
flags=re.IGNORECASE,
|
flags=re.IGNORECASE,
|
||||||
)
|
)
|
||||||
if not project_name_valid:
|
if not project_name_valid:
|
||||||
logger.warning(
|
# Check the directory name rather than the distribution name,
|
||||||
"Ignoring invalid distribution %s (%s)",
|
# since the pkg_resources (default below 3.11) backend normalizes
|
||||||
dist.canonical_name,
|
# the leading tilde to a dash.
|
||||||
dist.location,
|
# TODO: use dist.canonical_name for this check once
|
||||||
|
# pkg_resources support is dropped (#13317).
|
||||||
|
info_location = dist.info_location
|
||||||
|
leftover_name = (
|
||||||
|
pathlib.Path(info_location).name if info_location else ""
|
||||||
)
|
)
|
||||||
|
if leftover_name.startswith("~"):
|
||||||
|
logger.warning(
|
||||||
|
"Ignoring incompletely removed distribution %s (%s); "
|
||||||
|
"'~'-prefixed leftover directories are the result of a "
|
||||||
|
"previous incomplete installation, and can be deleted",
|
||||||
|
leftover_name,
|
||||||
|
dist.location,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
logger.warning(
|
||||||
|
"Ignoring invalid distribution %s (%s)",
|
||||||
|
dist.canonical_name,
|
||||||
|
dist.location,
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
yield dist
|
yield dist
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
|
|||||||
from pip._vendor.packaging.version import Version
|
from pip._vendor.packaging.version import Version
|
||||||
from pip._vendor.packaging.version import parse as parse_version
|
from pip._vendor.packaging.version import parse as parse_version
|
||||||
|
|
||||||
from pip._internal.exceptions import InvalidWheel, UnsupportedWheel
|
from pip._internal.exceptions import InstallationError, InvalidWheel, UnsupportedWheel
|
||||||
from pip._internal.metadata.base import (
|
from pip._internal.metadata.base import (
|
||||||
BaseDistribution,
|
BaseDistribution,
|
||||||
BaseEntryPoint,
|
BaseEntryPoint,
|
||||||
@@ -177,7 +177,7 @@ class Distribution(BaseDistribution):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def raw_version(self) -> str:
|
def raw_version(self) -> str:
|
||||||
return self._dist.version
|
return self.metadata["Version"]
|
||||||
|
|
||||||
def is_file(self, path: InfoPath) -> bool:
|
def is_file(self, path: InfoPath) -> bool:
|
||||||
return self._dist.read_text(str(path)) is not None
|
return self._dist.read_text(str(path)) is not None
|
||||||
@@ -199,7 +199,13 @@ class Distribution(BaseDistribution):
|
|||||||
|
|
||||||
def iter_entry_points(self) -> Iterable[BaseEntryPoint]:
|
def iter_entry_points(self) -> Iterable[BaseEntryPoint]:
|
||||||
# importlib.metadata's EntryPoint structure satisfies BaseEntryPoint.
|
# importlib.metadata's EntryPoint structure satisfies BaseEntryPoint.
|
||||||
return self._dist.entry_points
|
try:
|
||||||
|
return self._dist.entry_points
|
||||||
|
except ValueError as e:
|
||||||
|
# Python 3.15+ validates entry points while parsing.
|
||||||
|
raise InstallationError(
|
||||||
|
f"Error parsing entry points for {self.raw_name}: {e}"
|
||||||
|
) from e
|
||||||
|
|
||||||
def _metadata_impl(self) -> email.message.Message:
|
def _metadata_impl(self) -> email.message.Message:
|
||||||
# From Python 3.10+, importlib.metadata declares PackageMetadata as the
|
# From Python 3.10+, importlib.metadata declares PackageMetadata as the
|
||||||
@@ -207,7 +213,13 @@ class Distribution(BaseDistribution):
|
|||||||
# a ton of fields that we need, including get() and get_payload(). We
|
# a ton of fields that we need, including get() and get_payload(). We
|
||||||
# rely on the implementation that the object is actually a Message now,
|
# rely on the implementation that the object is actually a Message now,
|
||||||
# until upstream can improve the protocol. (python/cpython#94952)
|
# until upstream can improve the protocol. (python/cpython#94952)
|
||||||
return cast(email.message.Message, self._dist.metadata)
|
metadata = self._dist.metadata
|
||||||
|
# From Python 3.15+, importlib.metadata may return None when no
|
||||||
|
# metadata file (METADATA or PKG-INFO) exists in the distribution
|
||||||
|
# directory. (python/cpython#132947)
|
||||||
|
if metadata is None:
|
||||||
|
return email.message.Message()
|
||||||
|
return cast(email.message.Message, metadata)
|
||||||
|
|
||||||
def iter_provided_extras(self) -> Iterable[NormalizedName]:
|
def iter_provided_extras(self) -> Iterable[NormalizedName]:
|
||||||
return [
|
return [
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import pathlib
|
|||||||
import sys
|
import sys
|
||||||
import zipfile
|
import zipfile
|
||||||
from collections.abc import Iterator, Sequence
|
from collections.abc import Iterator, Sequence
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
from pip._vendor.packaging.utils import (
|
from pip._vendor.packaging.utils import (
|
||||||
InvalidWheelFilename,
|
InvalidWheelFilename,
|
||||||
@@ -24,6 +23,10 @@ from ._dists import Distribution
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# Used to avoid emitting duplicate invalid distribution metadata warnings for
|
||||||
|
# the same dist-info directory.
|
||||||
|
_warned_bad_metadata: set[BasePath | None] = set()
|
||||||
|
|
||||||
|
|
||||||
def _looks_like_wheel(location: str) -> bool:
|
def _looks_like_wheel(location: str) -> bool:
|
||||||
if not location.endswith(WHEEL_EXTENSION):
|
if not location.endswith(WHEEL_EXTENSION):
|
||||||
@@ -50,7 +53,7 @@ class _DistributionFinder:
|
|||||||
installations as well. It's useful feature, after all.
|
installations as well. It's useful feature, after all.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
FoundResult = tuple[importlib.metadata.Distribution, Optional[BasePath]]
|
FoundResult = tuple[importlib.metadata.Distribution, BasePath | None]
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self._found_names: set[NormalizedName] = set()
|
self._found_names: set[NormalizedName] = set()
|
||||||
@@ -69,7 +72,9 @@ class _DistributionFinder:
|
|||||||
try:
|
try:
|
||||||
name = get_dist_canonical_name(dist)
|
name = get_dist_canonical_name(dist)
|
||||||
except BadMetadata as e:
|
except BadMetadata as e:
|
||||||
logger.warning("Skipping %s due to %s", info_location, e.reason)
|
if info_location not in _warned_bad_metadata:
|
||||||
|
logger.warning("Skipping %s due to %s", info_location, e.reason)
|
||||||
|
_warned_bad_metadata.add(info_location)
|
||||||
continue
|
continue
|
||||||
if name in self._found_names:
|
if name in self._found_names:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -16,7 +16,12 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
|
|||||||
from pip._vendor.packaging.version import Version
|
from pip._vendor.packaging.version import Version
|
||||||
from pip._vendor.packaging.version import parse as parse_version
|
from pip._vendor.packaging.version import parse as parse_version
|
||||||
|
|
||||||
from pip._internal.exceptions import InvalidWheel, NoneMetadataError, UnsupportedWheel
|
from pip._internal.exceptions import (
|
||||||
|
InstallationError,
|
||||||
|
InvalidWheel,
|
||||||
|
NoneMetadataError,
|
||||||
|
UnsupportedWheel,
|
||||||
|
)
|
||||||
from pip._internal.utils.egg_link import egg_link_path_from_location
|
from pip._internal.utils.egg_link import egg_link_path_from_location
|
||||||
from pip._internal.utils.misc import display_path, normalize_path
|
from pip._internal.utils.misc import display_path, normalize_path
|
||||||
from pip._internal.utils.wheel import parse_wheel, read_wheel_metadata_file
|
from pip._internal.utils.wheel import parse_wheel, read_wheel_metadata_file
|
||||||
@@ -208,7 +213,13 @@ class Distribution(BaseDistribution):
|
|||||||
return content
|
return content
|
||||||
|
|
||||||
def iter_entry_points(self) -> Iterable[BaseEntryPoint]:
|
def iter_entry_points(self) -> Iterable[BaseEntryPoint]:
|
||||||
for group, entries in self._dist.get_entry_map().items():
|
try:
|
||||||
|
entry_map = self._dist.get_entry_map()
|
||||||
|
except ValueError as e:
|
||||||
|
raise InstallationError(
|
||||||
|
f"Error parsing entry points for {self.raw_name}: {e}"
|
||||||
|
) from e
|
||||||
|
for group, entries in entry_map.items():
|
||||||
for name, entry_point in entries.items():
|
for name, entry_point in entries.items():
|
||||||
name, _, value = str(entry_point).partition("=")
|
name, _, value = str(entry_point).partition("=")
|
||||||
yield EntryPoint(name=name.strip(), value=value.strip(), group=group)
|
yield EntryPoint(name=name.strip(), value=value.strip(), group=group)
|
||||||
|
|||||||
@@ -6,20 +6,22 @@ from pip._vendor.packaging.version import parse as parse_version
|
|||||||
from pip._internal.models.link import Link
|
from pip._internal.models.link import Link
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, slots=True)
|
||||||
class InstallationCandidate:
|
class InstallationCandidate:
|
||||||
"""Represents a potential "candidate" for installation."""
|
"""Represents a potential "candidate" for installation."""
|
||||||
|
|
||||||
__slots__ = ["name", "version", "link"]
|
|
||||||
|
|
||||||
name: str
|
name: str
|
||||||
version: Version
|
version: Version
|
||||||
link: Link
|
link: Link
|
||||||
|
locked: bool
|
||||||
|
|
||||||
def __init__(self, name: str, version: str, link: Link) -> None:
|
def __init__(
|
||||||
|
self, name: str, version: str, link: Link, locked: bool = False
|
||||||
|
) -> None:
|
||||||
object.__setattr__(self, "name", name)
|
object.__setattr__(self, "name", name)
|
||||||
object.__setattr__(self, "version", parse_version(version))
|
object.__setattr__(self, "version", parse_version(version))
|
||||||
object.__setattr__(self, "link", link)
|
object.__setattr__(self, "link", link)
|
||||||
|
object.__setattr__(self, "locked", locked)
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return f"{self.name!r} candidate (version {self.version} at {self.link})"
|
return f"{self.name!r} candidate (version {self.version} at {self.link})"
|
||||||
@@ -3,225 +3,40 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import re
|
from typing import Any
|
||||||
import urllib.parse
|
|
||||||
from collections.abc import Iterable
|
from pip._vendor.packaging.direct_url import (
|
||||||
from dataclasses import dataclass
|
ArchiveInfo,
|
||||||
from typing import Any, ClassVar, TypeVar, Union
|
DirectUrlValidationError,
|
||||||
|
DirInfo,
|
||||||
|
VcsInfo,
|
||||||
|
)
|
||||||
|
from pip._vendor.packaging.direct_url import (
|
||||||
|
DirectUrl as PackagingDirectUrl,
|
||||||
|
)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
"ArchiveInfo",
|
||||||
|
"DirInfo",
|
||||||
"DirectUrl",
|
"DirectUrl",
|
||||||
"DirectUrlValidationError",
|
"DirectUrlValidationError",
|
||||||
"DirInfo",
|
"DIRECT_URL_METADATA_NAME",
|
||||||
"ArchiveInfo",
|
|
||||||
"VcsInfo",
|
"VcsInfo",
|
||||||
]
|
]
|
||||||
|
|
||||||
T = TypeVar("T")
|
|
||||||
|
|
||||||
DIRECT_URL_METADATA_NAME = "direct_url.json"
|
DIRECT_URL_METADATA_NAME = "direct_url.json"
|
||||||
ENV_VAR_RE = re.compile(r"^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$")
|
|
||||||
|
|
||||||
|
|
||||||
class DirectUrlValidationError(Exception):
|
class DirectUrl(PackagingDirectUrl):
|
||||||
pass
|
def to_dict_compat(self) -> dict[str, Any]:
|
||||||
|
return dict(super().to_dict(generate_legacy_hash=True))
|
||||||
|
|
||||||
def _get(
|
|
||||||
d: dict[str, Any], expected_type: type[T], key: str, default: T | None = None
|
|
||||||
) -> T | None:
|
|
||||||
"""Get value from dictionary and verify expected type."""
|
|
||||||
if key not in d:
|
|
||||||
return default
|
|
||||||
value = d[key]
|
|
||||||
if not isinstance(value, expected_type):
|
|
||||||
raise DirectUrlValidationError(
|
|
||||||
f"{value!r} has unexpected type for {key} (expected {expected_type})"
|
|
||||||
)
|
|
||||||
return value
|
|
||||||
|
|
||||||
|
|
||||||
def _get_required(
|
|
||||||
d: dict[str, Any], expected_type: type[T], key: str, default: T | None = None
|
|
||||||
) -> T:
|
|
||||||
value = _get(d, expected_type, key, default)
|
|
||||||
if value is None:
|
|
||||||
raise DirectUrlValidationError(f"{key} must have a value")
|
|
||||||
return value
|
|
||||||
|
|
||||||
|
|
||||||
def _exactly_one_of(infos: Iterable[InfoType | None]) -> InfoType:
|
|
||||||
infos = [info for info in infos if info is not None]
|
|
||||||
if not infos:
|
|
||||||
raise DirectUrlValidationError(
|
|
||||||
"missing one of archive_info, dir_info, vcs_info"
|
|
||||||
)
|
|
||||||
if len(infos) > 1:
|
|
||||||
raise DirectUrlValidationError(
|
|
||||||
"more than one of archive_info, dir_info, vcs_info"
|
|
||||||
)
|
|
||||||
assert infos[0] is not None
|
|
||||||
return infos[0]
|
|
||||||
|
|
||||||
|
|
||||||
def _filter_none(**kwargs: Any) -> dict[str, Any]:
|
|
||||||
"""Make dict excluding None values."""
|
|
||||||
return {k: v for k, v in kwargs.items() if v is not None}
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class VcsInfo:
|
|
||||||
name: ClassVar = "vcs_info"
|
|
||||||
|
|
||||||
vcs: str
|
|
||||||
commit_id: str
|
|
||||||
requested_revision: str | None = None
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def _from_dict(cls, d: dict[str, Any] | None) -> VcsInfo | None:
|
|
||||||
if d is None:
|
|
||||||
return None
|
|
||||||
return cls(
|
|
||||||
vcs=_get_required(d, str, "vcs"),
|
|
||||||
commit_id=_get_required(d, str, "commit_id"),
|
|
||||||
requested_revision=_get(d, str, "requested_revision"),
|
|
||||||
)
|
|
||||||
|
|
||||||
def _to_dict(self) -> dict[str, Any]:
|
|
||||||
return _filter_none(
|
|
||||||
vcs=self.vcs,
|
|
||||||
requested_revision=self.requested_revision,
|
|
||||||
commit_id=self.commit_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ArchiveInfo:
|
|
||||||
name = "archive_info"
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
hash: str | None = None,
|
|
||||||
hashes: dict[str, str] | None = None,
|
|
||||||
) -> None:
|
|
||||||
# set hashes before hash, since the hash setter will further populate hashes
|
|
||||||
self.hashes = hashes
|
|
||||||
self.hash = hash
|
|
||||||
|
|
||||||
@property
|
|
||||||
def hash(self) -> str | None:
|
|
||||||
return self._hash
|
|
||||||
|
|
||||||
@hash.setter
|
|
||||||
def hash(self, value: str | None) -> None:
|
|
||||||
if value is not None:
|
|
||||||
# Auto-populate the hashes key to upgrade to the new format automatically.
|
|
||||||
# We don't back-populate the legacy hash key from hashes.
|
|
||||||
try:
|
|
||||||
hash_name, hash_value = value.split("=", 1)
|
|
||||||
except ValueError:
|
|
||||||
raise DirectUrlValidationError(
|
|
||||||
f"invalid archive_info.hash format: {value!r}"
|
|
||||||
)
|
|
||||||
if self.hashes is None:
|
|
||||||
self.hashes = {hash_name: hash_value}
|
|
||||||
elif hash_name not in self.hashes:
|
|
||||||
self.hashes = self.hashes.copy()
|
|
||||||
self.hashes[hash_name] = hash_value
|
|
||||||
self._hash = value
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def _from_dict(cls, d: dict[str, Any] | None) -> ArchiveInfo | None:
|
|
||||||
if d is None:
|
|
||||||
return None
|
|
||||||
return cls(hash=_get(d, str, "hash"), hashes=_get(d, dict, "hashes"))
|
|
||||||
|
|
||||||
def _to_dict(self) -> dict[str, Any]:
|
|
||||||
return _filter_none(hash=self.hash, hashes=self.hashes)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class DirInfo:
|
|
||||||
name: ClassVar = "dir_info"
|
|
||||||
|
|
||||||
editable: bool = False
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def _from_dict(cls, d: dict[str, Any] | None) -> DirInfo | None:
|
|
||||||
if d is None:
|
|
||||||
return None
|
|
||||||
return cls(editable=_get_required(d, bool, "editable", default=False))
|
|
||||||
|
|
||||||
def _to_dict(self) -> dict[str, Any]:
|
|
||||||
return _filter_none(editable=self.editable or None)
|
|
||||||
|
|
||||||
|
|
||||||
InfoType = Union[ArchiveInfo, DirInfo, VcsInfo]
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class DirectUrl:
|
|
||||||
url: str
|
|
||||||
info: InfoType
|
|
||||||
subdirectory: str | None = None
|
|
||||||
|
|
||||||
def _remove_auth_from_netloc(self, netloc: str) -> str:
|
|
||||||
if "@" not in netloc:
|
|
||||||
return netloc
|
|
||||||
user_pass, netloc_no_user_pass = netloc.split("@", 1)
|
|
||||||
if (
|
|
||||||
isinstance(self.info, VcsInfo)
|
|
||||||
and self.info.vcs == "git"
|
|
||||||
and user_pass == "git"
|
|
||||||
):
|
|
||||||
return netloc
|
|
||||||
if ENV_VAR_RE.match(user_pass):
|
|
||||||
return netloc
|
|
||||||
return netloc_no_user_pass
|
|
||||||
|
|
||||||
@property
|
|
||||||
def redacted_url(self) -> str:
|
|
||||||
"""url with user:password part removed unless it is formed with
|
|
||||||
environment variables as specified in PEP 610, or it is ``git``
|
|
||||||
in the case of a git URL.
|
|
||||||
"""
|
|
||||||
purl = urllib.parse.urlsplit(self.url)
|
|
||||||
netloc = self._remove_auth_from_netloc(purl.netloc)
|
|
||||||
surl = urllib.parse.urlunsplit(
|
|
||||||
(purl.scheme, netloc, purl.path, purl.query, purl.fragment)
|
|
||||||
)
|
|
||||||
return surl
|
|
||||||
|
|
||||||
def validate(self) -> None:
|
|
||||||
self.from_dict(self.to_dict())
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, d: dict[str, Any]) -> DirectUrl:
|
|
||||||
return DirectUrl(
|
|
||||||
url=_get_required(d, str, "url"),
|
|
||||||
subdirectory=_get(d, str, "subdirectory"),
|
|
||||||
info=_exactly_one_of(
|
|
||||||
[
|
|
||||||
ArchiveInfo._from_dict(_get(d, dict, "archive_info")),
|
|
||||||
DirInfo._from_dict(_get(d, dict, "dir_info")),
|
|
||||||
VcsInfo._from_dict(_get(d, dict, "vcs_info")),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
def to_dict(self) -> dict[str, Any]:
|
|
||||||
res = _filter_none(
|
|
||||||
url=self.redacted_url,
|
|
||||||
subdirectory=self.subdirectory,
|
|
||||||
)
|
|
||||||
res[self.info.name] = self.info._to_dict()
|
|
||||||
return res
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_json(cls, s: str) -> DirectUrl:
|
def from_json(cls, s: str) -> DirectUrl:
|
||||||
return cls.from_dict(json.loads(s))
|
return cls.from_dict(json.loads(s))
|
||||||
|
|
||||||
def to_json(self) -> str:
|
def to_json(self) -> str:
|
||||||
return json.dumps(self.to_dict(), sort_keys=True)
|
return json.dumps(self.to_dict_compat(), sort_keys=True)
|
||||||
|
|
||||||
def is_local_editable(self) -> bool:
|
def is_local_editable(self) -> bool:
|
||||||
return isinstance(self.info, DirInfo) and self.info.editable
|
return bool(self.dir_info and self.dir_info.editable)
|
||||||
@@ -19,7 +19,7 @@ class InstallationReport:
|
|||||||
# be absent when the requirement was installed from the wheel cache
|
# be absent when the requirement was installed from the wheel cache
|
||||||
# and the cache entry was populated by an older pip version that did not
|
# and the cache entry was populated by an older pip version that did not
|
||||||
# record origin.json.
|
# record origin.json.
|
||||||
"download_info": ireq.download_info.to_dict(),
|
"download_info": ireq.download_info.to_dict_compat(),
|
||||||
# is_direct is true if the requirement was a direct URL reference (which
|
# is_direct is true if the requirement was a direct URL reference (which
|
||||||
# includes editable requirements), and false if the requirement was
|
# includes editable requirements), and false if the requirement was
|
||||||
# downloaded from a PEP 503 index or --find-links.
|
# downloaded from a PEP 503 index or --find-links.
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ import os
|
|||||||
import posixpath
|
import posixpath
|
||||||
import re
|
import re
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import (
|
from typing import (
|
||||||
Any,
|
Any,
|
||||||
NamedTuple,
|
NamedTuple,
|
||||||
|
NewType,
|
||||||
)
|
)
|
||||||
|
|
||||||
from pip._internal.exceptions import InvalidEggFragment
|
from pip._internal.exceptions import InvalidEggFragment
|
||||||
@@ -31,6 +31,49 @@ from pip._internal.utils.urls import path_to_url, url_to_path
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
# A single path component: percent-decoded once and reduced to a basename, so it
|
||||||
|
# contains no path separator and is not a ``.`` or ``..`` reference. The empty
|
||||||
|
# string means "no component".
|
||||||
|
PathComponent = NewType("PathComponent", str)
|
||||||
|
|
||||||
|
|
||||||
|
def _to_path_component(name: str) -> PathComponent:
|
||||||
|
"""Reduce ``name`` to a single path component, or ``""`` if it has none.
|
||||||
|
|
||||||
|
``os.path.basename`` drops any directory part, drive letter, or separator;
|
||||||
|
a ``.``, ``..``, or empty result is not a component and becomes ``""``.
|
||||||
|
"""
|
||||||
|
name = os.path.basename(name)
|
||||||
|
if name in ("", os.curdir, os.pardir):
|
||||||
|
return PathComponent("")
|
||||||
|
|
||||||
|
return PathComponent(name)
|
||||||
|
|
||||||
|
|
||||||
|
def as_path_component(name: str) -> PathComponent:
|
||||||
|
"""Like ``_to_path_component`` but reject the empty result.
|
||||||
|
|
||||||
|
Use where a file is about to be written, so a missing name is an error
|
||||||
|
rather than a silent fallback to the directory itself.
|
||||||
|
"""
|
||||||
|
component = _to_path_component(name)
|
||||||
|
if not component:
|
||||||
|
raise ValueError(f"Unexpected file name derived from URL: {name!r}")
|
||||||
|
|
||||||
|
return component
|
||||||
|
|
||||||
|
|
||||||
|
def join_within_directory(directory: str, component: PathComponent) -> str:
|
||||||
|
"""Join a single path ``component`` onto ``directory``.
|
||||||
|
|
||||||
|
``component`` is a :data:`PathComponent`, so by type it has no separator and
|
||||||
|
is not a ``.`` or ``..`` reference; the result can never escape ``directory``.
|
||||||
|
Requiring ``PathComponent`` rather than ``str`` lets the type checker enforce
|
||||||
|
at the call site that the name was reduced to a safe component beforehand.
|
||||||
|
"""
|
||||||
|
return os.path.join(directory, component)
|
||||||
|
|
||||||
|
|
||||||
# Order matters, earlier hashes have a precedence over later hashes for what
|
# Order matters, earlier hashes have a precedence over later hashes for what
|
||||||
# we will pick to use.
|
# we will pick to use.
|
||||||
_SUPPORTED_HASHES = ("sha512", "sha384", "sha256", "sha224", "sha1", "md5")
|
_SUPPORTED_HASHES = ("sha512", "sha384", "sha256", "sha224", "sha1", "md5")
|
||||||
@@ -125,6 +168,8 @@ def _clean_file_url_path(part: str) -> str:
|
|||||||
Clean the first part of a URL path that corresponds to a local
|
Clean the first part of a URL path that corresponds to a local
|
||||||
filesystem path (i.e. the first part after splitting on "@" characters).
|
filesystem path (i.e. the first part after splitting on "@" characters).
|
||||||
"""
|
"""
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
# We unquote prior to quoting to make sure nothing is double quoted.
|
# We unquote prior to quoting to make sure nothing is double quoted.
|
||||||
# Also, on Windows the path part might contain a drive letter which
|
# Also, on Windows the path part might contain a drive letter which
|
||||||
# should not be quoted. On Linux where drive letters do not
|
# should not be quoted. On Linux where drive letters do not
|
||||||
@@ -423,18 +468,13 @@ class Link:
|
|||||||
return redact_auth_from_url(self.url)
|
return redact_auth_from_url(self.url)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def filename(self) -> str:
|
def filename(self) -> PathComponent:
|
||||||
path = self.path.rstrip("/")
|
name = _to_path_component(posixpath.basename(self.path.rstrip("/")))
|
||||||
name = posixpath.basename(path)
|
if name:
|
||||||
if not name:
|
return name
|
||||||
# Make sure we don't leak auth information if the netloc
|
|
||||||
# includes a username and password.
|
|
||||||
netloc, user_pass = split_auth_from_netloc(self.netloc)
|
|
||||||
return netloc
|
|
||||||
|
|
||||||
name = urllib.parse.unquote(name)
|
# No component in the path; fall back to the netloc, dropping any auth.
|
||||||
assert name, f"URL {self._url!r} produced no filename"
|
return _to_path_component(split_auth_from_netloc(self.netloc)[0])
|
||||||
return name
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def file_path(self) -> str:
|
def file_path(self) -> str:
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name
|
|||||||
from pip._internal.exceptions import CommandError
|
from pip._internal.exceptions import CommandError
|
||||||
|
|
||||||
|
|
||||||
# TODO: add slots=True when Python 3.9 is dropped
|
@dataclass(slots=True)
|
||||||
@dataclass
|
|
||||||
class ReleaseControl:
|
class ReleaseControl:
|
||||||
"""Helper for managing which release types can be installed."""
|
"""Helper for managing which release types can be installed."""
|
||||||
|
|
||||||
|
|||||||
@@ -10,14 +10,12 @@ from dataclasses import dataclass
|
|||||||
SCHEME_KEYS = ["platlib", "purelib", "headers", "scripts", "data"]
|
SCHEME_KEYS = ["platlib", "purelib", "headers", "scripts", "data"]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, slots=True)
|
||||||
class Scheme:
|
class Scheme:
|
||||||
"""A Scheme holds paths which are used as the base directories for
|
"""A Scheme holds paths which are used as the base directories for
|
||||||
artifacts associated with a Python package.
|
artifacts associated with a Python package.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = SCHEME_KEYS
|
|
||||||
|
|
||||||
platlib: str
|
platlib: str
|
||||||
purelib: str
|
purelib: str
|
||||||
headers: str
|
headers: str
|
||||||
|
|||||||
@@ -14,14 +14,12 @@ from pip._internal.utils.misc import normalize_path, redact_auth_from_url
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, slots=True)
|
||||||
class SearchScope:
|
class SearchScope:
|
||||||
"""
|
"""
|
||||||
Encapsulates the locations that pip is configured to search.
|
Encapsulates the locations that pip is configured to search.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ["find_links", "index_urls", "no_index"]
|
|
||||||
|
|
||||||
find_links: list[str]
|
find_links: list[str]
|
||||||
index_urls: list[str]
|
index_urls: list[str]
|
||||||
no_index: bool
|
no_index: bool
|
||||||
|
|||||||
@@ -1,56 +1,36 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from pip._internal.models.format_control import FormatControl
|
from pip._internal.models.format_control import FormatControl
|
||||||
from pip._internal.models.release_control import ReleaseControl
|
from pip._internal.models.release_control import ReleaseControl
|
||||||
|
|
||||||
|
|
||||||
# TODO: This needs Python 3.10's improved slots support for dataclasses
|
@dataclass(slots=True)
|
||||||
# to be converted into a dataclass.
|
|
||||||
class SelectionPreferences:
|
class SelectionPreferences:
|
||||||
"""
|
"""
|
||||||
Encapsulates the candidate selection preferences for downloading
|
Encapsulates the candidate selection preferences for downloading
|
||||||
and installing files.
|
and installing files.
|
||||||
"""
|
|
||||||
|
|
||||||
__slots__ = [
|
:param allow_yanked: Whether files marked as yanked (in the sense
|
||||||
"allow_yanked",
|
of PEP 592) are permitted to be candidates for install.
|
||||||
"release_control",
|
:param release_control: A ReleaseControl object or None. Used to control
|
||||||
"format_control",
|
whether pre-releases are allowed for specific packages.
|
||||||
"prefer_binary",
|
:param format_control: A FormatControl object or None. Used to control
|
||||||
"ignore_requires_python",
|
the selection of source packages / binary packages when consulting
|
||||||
]
|
the index and links.
|
||||||
|
:param prefer_binary: Whether to prefer an old, but valid, binary
|
||||||
|
dist over a new source dist.
|
||||||
|
:param ignore_requires_python: Whether to ignore incompatible
|
||||||
|
"Requires-Python" values in links. Defaults to False.
|
||||||
|
"""
|
||||||
|
|
||||||
# Don't include an allow_yanked default value to make sure each call
|
# Don't include an allow_yanked default value to make sure each call
|
||||||
# site considers whether yanked releases are allowed. This also causes
|
# site considers whether yanked releases are allowed. This also causes
|
||||||
# that decision to be made explicit in the calling code, which helps
|
# that decision to be made explicit in the calling code, which helps
|
||||||
# people when reading the code.
|
# people when reading the code.
|
||||||
def __init__(
|
allow_yanked: bool
|
||||||
self,
|
release_control: ReleaseControl | None = None
|
||||||
allow_yanked: bool,
|
format_control: FormatControl | None = None
|
||||||
release_control: ReleaseControl | None = None,
|
prefer_binary: bool = False
|
||||||
format_control: FormatControl | None = None,
|
ignore_requires_python: bool = False
|
||||||
prefer_binary: bool = False,
|
|
||||||
ignore_requires_python: bool | None = None,
|
|
||||||
) -> None:
|
|
||||||
"""Create a SelectionPreferences object.
|
|
||||||
|
|
||||||
:param allow_yanked: Whether files marked as yanked (in the sense
|
|
||||||
of PEP 592) are permitted to be candidates for install.
|
|
||||||
:param release_control: A ReleaseControl object or None. Used to control
|
|
||||||
whether pre-releases are allowed for specific packages.
|
|
||||||
:param format_control: A FormatControl object or None. Used to control
|
|
||||||
the selection of source packages / binary packages when consulting
|
|
||||||
the index and links.
|
|
||||||
:param prefer_binary: Whether to prefer an old, but valid, binary
|
|
||||||
dist over a new source dist.
|
|
||||||
:param ignore_requires_python: Whether to ignore incompatible
|
|
||||||
"Requires-Python" values in links. Defaults to False.
|
|
||||||
"""
|
|
||||||
if ignore_requires_python is None:
|
|
||||||
ignore_requires_python = False
|
|
||||||
|
|
||||||
self.allow_yanked = allow_yanked
|
|
||||||
self.release_control = release_control
|
|
||||||
self.format_control = format_control
|
|
||||||
self.prefer_binary = prefer_binary
|
|
||||||
self.ignore_requires_python = ignore_requires_python
|
|
||||||
@@ -6,6 +6,7 @@ providing credentials in the context of network requests.
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@@ -15,7 +16,7 @@ import typing
|
|||||||
import urllib.parse
|
import urllib.parse
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from functools import cache
|
from functools import cache
|
||||||
from os.path import commonprefix
|
from os.path import commonpath
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, NamedTuple
|
from typing import Any, NamedTuple
|
||||||
|
|
||||||
@@ -118,34 +119,48 @@ class KeyRingCliProvider(KeyRingBaseProvider):
|
|||||||
self.keyring = cmd
|
self.keyring = cmd
|
||||||
|
|
||||||
def get_auth_info(self, url: str, username: str | None) -> AuthInfo | None:
|
def get_auth_info(self, url: str, username: str | None) -> AuthInfo | None:
|
||||||
# This is the default implementation of keyring.get_credential
|
return self._get_creds(url, username)
|
||||||
# https://github.com/jaraco/keyring/blob/97689324abcf01bd1793d49063e7ca01e03d7d07/keyring/backend.py#L134-L139
|
|
||||||
if username is not None:
|
|
||||||
password = self._get_password(url, username)
|
|
||||||
if password is not None:
|
|
||||||
return username, password
|
|
||||||
return None
|
|
||||||
|
|
||||||
def save_auth_info(self, url: str, username: str, password: str) -> None:
|
def save_auth_info(self, url: str, username: str, password: str) -> None:
|
||||||
return self._set_password(url, username, password)
|
return self._set_password(url, username, password)
|
||||||
|
|
||||||
def _get_password(self, service_name: str, username: str) -> str | None:
|
def _get_creds(self, service_name: str, username: str | None) -> AuthInfo | None:
|
||||||
"""Mirror the implementation of keyring.get_password using cli"""
|
"""Mirror the implementation of keyring.get_credential using cli"""
|
||||||
if self.keyring is None:
|
if self.keyring is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
cmd = [self.keyring, "get", service_name, username]
|
cmd = [self.keyring, "--mode=creds", "--output=json", "get", service_name]
|
||||||
|
if username is not None:
|
||||||
|
cmd.append(username)
|
||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["PYTHONIOENCODING"] = "utf-8"
|
env["PYTHONIOENCODING"] = "utf-8"
|
||||||
res = subprocess.run(
|
res = subprocess.run( # noqa: UP022
|
||||||
cmd,
|
cmd,
|
||||||
stdin=subprocess.DEVNULL,
|
stdin=subprocess.DEVNULL,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
env=env,
|
env=env,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Detect if the user is running an outdated version of keyring without support
|
||||||
|
# for querying credentials without username
|
||||||
|
errs = res.stderr.decode("utf-8")
|
||||||
|
if (
|
||||||
|
res.returncode == 2
|
||||||
|
and "unrecognized arguments" in errs
|
||||||
|
and "--mode=creds" in errs
|
||||||
|
):
|
||||||
|
raise RuntimeError(
|
||||||
|
"Keyring util is outdated; must be at least version 25.2.1, "
|
||||||
|
"please upgrade it"
|
||||||
|
)
|
||||||
|
|
||||||
if res.returncode:
|
if res.returncode:
|
||||||
return None
|
return None
|
||||||
return res.stdout.decode("utf-8").strip(os.linesep)
|
|
||||||
|
data = json.loads(res.stdout.decode("utf-8"))
|
||||||
|
return (data["username"], data["password"])
|
||||||
|
|
||||||
def _set_password(self, service_name: str, username: str, password: str) -> None:
|
def _set_password(self, service_name: str, username: str, password: str) -> None:
|
||||||
"""Mirror the implementation of keyring.set_password using cli"""
|
"""Mirror the implementation of keyring.set_password using cli"""
|
||||||
@@ -325,12 +340,14 @@ class MultiDomainBasicAuth(AuthBase):
|
|||||||
|
|
||||||
candidates.sort(
|
candidates.sort(
|
||||||
reverse=True,
|
reverse=True,
|
||||||
key=lambda candidate: commonprefix(
|
key=lambda candidate: len(
|
||||||
[
|
commonpath(
|
||||||
parsed_url.path,
|
[
|
||||||
candidate.path,
|
parsed_url.path,
|
||||||
]
|
candidate.path,
|
||||||
).rfind("/"),
|
]
|
||||||
|
)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
return urllib.parse.urlunsplit(candidates[0])
|
return urllib.parse.urlunsplit(candidates[0])
|
||||||
@@ -485,15 +502,17 @@ class MultiDomainBasicAuth(AuthBase):
|
|||||||
if resp.status_code != 401:
|
if resp.status_code != 401:
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
username, password = None, None
|
# Look for credentials for the (possibly redirected) URL. Credentials
|
||||||
|
# embedded in the URL -- e.g. carried in the ``Location`` of a
|
||||||
# Query the keyring for credentials:
|
# cross-origin redirect, whose ``Authorization`` header requests strips
|
||||||
if self.use_keyring:
|
# -- are always honoured, since recovering them needs no user
|
||||||
username, password = self._get_new_credentials(
|
# interaction. Keyring is only consulted when it is enabled, because it
|
||||||
resp.url,
|
# may require interaction and is therefore disabled under --no-input.
|
||||||
allow_netrc=False,
|
username, password = self._get_new_credentials(
|
||||||
allow_keyring=True,
|
resp.url,
|
||||||
)
|
allow_netrc=False,
|
||||||
|
allow_keyring=self.use_keyring,
|
||||||
|
)
|
||||||
|
|
||||||
# We are not able to prompt the user so simply return the response
|
# We are not able to prompt the user so simply return the response
|
||||||
if not self.prompting and not username and not password:
|
if not self.prompting and not username and not password:
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from collections.abc import Generator
|
from collections.abc import Callable, Generator
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Any, BinaryIO, Callable
|
from typing import Any, BinaryIO
|
||||||
|
|
||||||
from pip._vendor.cachecontrol.cache import SeparateBodyBaseCache
|
from pip._vendor.cachecontrol.cache import SeparateBodyBaseCache
|
||||||
from pip._vendor.cachecontrol.caches import SeparateBodyFileCache
|
from pip._vendor.cachecontrol.caches import SeparateBodyFileCache
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import email.message
|
import email.message
|
||||||
import logging
|
import logging
|
||||||
import mimetypes
|
import mimetypes
|
||||||
@@ -15,12 +16,23 @@ from pip._vendor.requests import PreparedRequest
|
|||||||
from pip._vendor.requests.models import Response
|
from pip._vendor.requests.models import Response
|
||||||
from pip._vendor.urllib3 import HTTPResponse as URLlib3Response
|
from pip._vendor.urllib3 import HTTPResponse as URLlib3Response
|
||||||
from pip._vendor.urllib3._collections import HTTPHeaderDict
|
from pip._vendor.urllib3._collections import HTTPHeaderDict
|
||||||
from pip._vendor.urllib3.exceptions import ReadTimeoutError
|
from pip._vendor.urllib3.exceptions import ProtocolError, ReadTimeoutError
|
||||||
|
|
||||||
from pip._internal.cli.progress_bars import BarType, get_download_progress_renderer
|
from pip._internal.cli.progress_bars import BarType, get_download_progress_renderer
|
||||||
from pip._internal.exceptions import IncompleteDownloadError, NetworkConnectionError
|
from pip._internal.exceptions import (
|
||||||
from pip._internal.models.index import PyPI
|
ConnectionFailedError,
|
||||||
from pip._internal.models.link import Link
|
ConnectionTimeoutError,
|
||||||
|
IncompleteDownloadError,
|
||||||
|
NetworkConnectionError,
|
||||||
|
ProxyConnectionError,
|
||||||
|
SSLVerificationError,
|
||||||
|
)
|
||||||
|
from pip._internal.models.link import (
|
||||||
|
Link,
|
||||||
|
PathComponent,
|
||||||
|
as_path_component,
|
||||||
|
join_within_directory,
|
||||||
|
)
|
||||||
from pip._internal.network.cache import SafeFileCache, is_from_cache
|
from pip._internal.network.cache import SafeFileCache, is_from_cache
|
||||||
from pip._internal.network.session import CacheControlAdapter, PipSession
|
from pip._internal.network.session import CacheControlAdapter, PipSession
|
||||||
from pip._internal.network.utils import HEADERS, raise_for_status, response_chunks
|
from pip._internal.network.utils import HEADERS, raise_for_status, response_chunks
|
||||||
@@ -31,9 +43,14 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
def _get_http_response_size(resp: Response) -> int | None:
|
def _get_http_response_size(resp: Response) -> int | None:
|
||||||
try:
|
try:
|
||||||
return int(resp.headers["content-length"])
|
size = int(resp.headers["content-length"])
|
||||||
except (ValueError, KeyError, TypeError):
|
except (ValueError, KeyError, TypeError):
|
||||||
return None
|
return None
|
||||||
|
# A negative length would make _FileDownload.is_incomplete() report a
|
||||||
|
# truncated download as complete, so treat it as unknown instead.
|
||||||
|
if size < 0:
|
||||||
|
return None
|
||||||
|
return size
|
||||||
|
|
||||||
|
|
||||||
def _get_http_response_etag_or_last_modified(resp: Response) -> str | None:
|
def _get_http_response_etag_or_last_modified(resp: Response) -> str | None:
|
||||||
@@ -51,10 +68,10 @@ def _log_download(
|
|||||||
total_length: int | None,
|
total_length: int | None,
|
||||||
range_start: int | None = 0,
|
range_start: int | None = 0,
|
||||||
) -> Iterable[bytes]:
|
) -> Iterable[bytes]:
|
||||||
if link.netloc == PyPI.file_storage_domain:
|
if logger.getEffectiveLevel() > logging.INFO:
|
||||||
url = link.show_url
|
|
||||||
else:
|
|
||||||
url = link.url_without_fragment
|
url = link.url_without_fragment
|
||||||
|
else:
|
||||||
|
url = link.show_url
|
||||||
|
|
||||||
logged_url = redact_auth_from_url(url)
|
logged_url = redact_auth_from_url(url)
|
||||||
|
|
||||||
@@ -117,11 +134,14 @@ def parse_content_disposition(content_disposition: str, default_filename: str) -
|
|||||||
return filename or default_filename
|
return filename or default_filename
|
||||||
|
|
||||||
|
|
||||||
def _get_http_response_filename(resp: Response, link: Link) -> str:
|
def _get_http_response_filename(resp: Response, link: Link) -> PathComponent:
|
||||||
"""Get an ideal filename from the given HTTP response, falling back to
|
"""Get an ideal filename from the given HTTP response, falling back to
|
||||||
the link filename if not provided.
|
the link filename if not provided.
|
||||||
|
|
||||||
|
The result is validated as a single path component, so it can be joined onto
|
||||||
|
a download directory without escaping it.
|
||||||
"""
|
"""
|
||||||
filename = link.filename # fallback
|
filename: str = link.filename # fallback
|
||||||
# Have a look at the Content-Disposition header for a better guess
|
# Have a look at the Content-Disposition header for a better guess
|
||||||
content_disposition = resp.headers.get("content-disposition")
|
content_disposition = resp.headers.get("content-disposition")
|
||||||
if content_disposition:
|
if content_disposition:
|
||||||
@@ -135,7 +155,7 @@ def _get_http_response_filename(resp: Response, link: Link) -> str:
|
|||||||
ext = os.path.splitext(resp.url)[1]
|
ext = os.path.splitext(resp.url)[1]
|
||||||
if ext:
|
if ext:
|
||||||
filename += ext
|
filename += ext
|
||||||
return filename
|
return as_path_component(filename)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -188,12 +208,19 @@ class Downloader:
|
|||||||
resp = self._http_get(link)
|
resp = self._http_get(link)
|
||||||
download_size = _get_http_response_size(resp)
|
download_size = _get_http_response_size(resp)
|
||||||
|
|
||||||
filepath = os.path.join(location, _get_http_response_filename(resp, link))
|
filepath = join_within_directory(
|
||||||
with open(filepath, "wb") as content_file:
|
location, _get_http_response_filename(resp, link)
|
||||||
download = _FileDownload(link, content_file, download_size)
|
)
|
||||||
self._process_response(download, resp)
|
try:
|
||||||
if download.is_incomplete():
|
with open(filepath, "wb") as content_file:
|
||||||
self._attempt_resumes_or_redownloads(download, resp)
|
download = _FileDownload(link, content_file, download_size)
|
||||||
|
self._process_response(download, resp)
|
||||||
|
if download.is_incomplete():
|
||||||
|
self._attempt_resumes_or_redownloads(download, resp)
|
||||||
|
except IncompleteDownloadError:
|
||||||
|
with contextlib.suppress(OSError):
|
||||||
|
os.remove(filepath)
|
||||||
|
raise
|
||||||
|
|
||||||
content_type = resp.headers.get("Content-Type", "")
|
content_type = resp.headers.get("Content-Type", "")
|
||||||
return filepath, content_type
|
return filepath, content_type
|
||||||
@@ -210,12 +237,12 @@ class Downloader:
|
|||||||
try:
|
try:
|
||||||
for chunk in chunks:
|
for chunk in chunks:
|
||||||
download.write_chunk(chunk)
|
download.write_chunk(chunk)
|
||||||
except ReadTimeoutError as e:
|
except (ReadTimeoutError, ProtocolError) as e:
|
||||||
# If the download size is not known, then give up downloading the file.
|
# If the download size is not known, then give up downloading the file.
|
||||||
if download.size is None:
|
if download.size is None:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
logger.warning("Connection timed out while downloading.")
|
logger.warning("Connection interrupted while downloading.")
|
||||||
|
|
||||||
def _attempt_resumes_or_redownloads(
|
def _attempt_resumes_or_redownloads(
|
||||||
self, download: _FileDownload, first_resp: Response
|
self, download: _FileDownload, first_resp: Response
|
||||||
@@ -242,14 +269,38 @@ class Downloader:
|
|||||||
download.reset_file()
|
download.reset_file()
|
||||||
download.size = _get_http_response_size(resume_resp)
|
download.size = _get_http_response_size(resume_resp)
|
||||||
first_resp = resume_resp
|
first_resp = resume_resp
|
||||||
|
else:
|
||||||
|
# If the resume request starts at the wrong location, fail
|
||||||
|
# outright since the server is misbehaving.
|
||||||
|
content_range = resume_resp.headers.get("Content-Range", "")
|
||||||
|
resumed_at = content_range.lower().partition("bytes ")[2]
|
||||||
|
resumed_at = resumed_at.partition("-")[0]
|
||||||
|
if resumed_at and resumed_at != str(download.bytes_received):
|
||||||
|
raise IncompleteDownloadError(download)
|
||||||
|
|
||||||
self._process_response(download, resume_resp)
|
self._process_response(download, resume_resp)
|
||||||
except (ConnectionError, ReadTimeoutError, OSError):
|
except (
|
||||||
|
ConnectionFailedError,
|
||||||
|
ConnectionTimeoutError,
|
||||||
|
ProxyConnectionError,
|
||||||
|
SSLVerificationError,
|
||||||
|
ReadTimeoutError,
|
||||||
|
ProtocolError,
|
||||||
|
OSError,
|
||||||
|
):
|
||||||
|
# The error handling here is tricky, a few notes:
|
||||||
|
#
|
||||||
|
# - The diagnostic connection errors are raised by our custom
|
||||||
|
# requests.request() connection exception handler.
|
||||||
|
# - ProtocolError is raised by urllib3 when the returned data length
|
||||||
|
# doesn't match the response Content-Length.
|
||||||
|
# - ReadTimeoutError / ProtocolError come straight from urllib3 (via
|
||||||
|
# process_response) and aren't caught by our connection exception
|
||||||
|
# handler since they occur while *streaming* a response.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# No more resume attempts. Raise an error if the download is still incomplete.
|
# No more resume attempts. Raise an error if the download is still incomplete.
|
||||||
if download.is_incomplete():
|
if download.is_incomplete():
|
||||||
os.remove(download.output_file.name)
|
|
||||||
raise IncompleteDownloadError(download)
|
raise IncompleteDownloadError(download)
|
||||||
|
|
||||||
# If we successfully completed the download via resume, manually cache it
|
# If we successfully completed the download via resume, manually cache it
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ from collections.abc import Generator, Mapping, Sequence
|
|||||||
from typing import (
|
from typing import (
|
||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
Any,
|
Any,
|
||||||
Optional,
|
|
||||||
Union,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from pip._vendor import requests, urllib3
|
from pip._vendor import requests, urllib3
|
||||||
@@ -36,27 +34,33 @@ from pip._vendor.urllib3.connectionpool import ConnectionPool
|
|||||||
from pip._vendor.urllib3.exceptions import InsecureRequestWarning
|
from pip._vendor.urllib3.exceptions import InsecureRequestWarning
|
||||||
|
|
||||||
from pip import __version__
|
from pip import __version__
|
||||||
|
from pip._internal.exceptions import SSLMissingError
|
||||||
from pip._internal.metadata import get_default_environment
|
from pip._internal.metadata import get_default_environment
|
||||||
from pip._internal.models.link import Link
|
from pip._internal.models.link import Link
|
||||||
from pip._internal.network.auth import MultiDomainBasicAuth
|
from pip._internal.network.auth import MultiDomainBasicAuth
|
||||||
from pip._internal.network.cache import SafeFileCache
|
from pip._internal.network.cache import SafeFileCache
|
||||||
|
from pip._internal.network.utils import raise_connection_error
|
||||||
|
|
||||||
# Import ssl from compat so the initial import occurs in only one place.
|
# Import ssl from compat so the initial import occurs in only one place.
|
||||||
from pip._internal.utils.compat import has_tls
|
from pip._internal.utils.compat import has_tls
|
||||||
from pip._internal.utils.glibc import libc_ver
|
from pip._internal.utils.glibc import libc_ver
|
||||||
from pip._internal.utils.misc import build_url_from_netloc, parse_netloc
|
from pip._internal.utils.misc import (
|
||||||
|
build_url_from_netloc,
|
||||||
|
looks_like_ci,
|
||||||
|
parse_netloc,
|
||||||
|
redact_auth_from_url,
|
||||||
|
)
|
||||||
from pip._internal.utils.urls import url_to_path
|
from pip._internal.utils.urls import url_to_path
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ssl import SSLContext
|
from ssl import SSLContext
|
||||||
|
|
||||||
from pip._vendor.urllib3 import ProxyManager
|
from pip._vendor.urllib3 import ProxyManager
|
||||||
from pip._vendor.urllib3.poolmanager import PoolManager
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
SecureOrigin = tuple[str, str, Optional[Union[int, str]]]
|
SecureOrigin = tuple[str, str, int | str | None]
|
||||||
|
|
||||||
|
|
||||||
# Ignore warning raised when using --trusted-host.
|
# Ignore warning raised when using --trusted-host.
|
||||||
@@ -76,35 +80,6 @@ SECURE_ORIGINS: list[SecureOrigin] = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
# These are environment variables present when running under various
|
|
||||||
# CI systems. For each variable, some CI systems that use the variable
|
|
||||||
# are indicated. The collection was chosen so that for each of a number
|
|
||||||
# of popular systems, at least one of the environment variables is used.
|
|
||||||
# This list is used to provide some indication of and lower bound for
|
|
||||||
# CI traffic to PyPI. Thus, it is okay if the list is not comprehensive.
|
|
||||||
# For more background, see: https://github.com/pypa/pip/issues/5499
|
|
||||||
CI_ENVIRONMENT_VARIABLES = (
|
|
||||||
# Azure Pipelines
|
|
||||||
"BUILD_BUILDID",
|
|
||||||
# Jenkins
|
|
||||||
"BUILD_ID",
|
|
||||||
# AppVeyor, CircleCI, Codeship, Gitlab CI, Shippable, Travis CI
|
|
||||||
"CI",
|
|
||||||
# Explicit environment variable.
|
|
||||||
"PIP_IS_CI",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def looks_like_ci() -> bool:
|
|
||||||
"""
|
|
||||||
Return whether it looks like pip is running under CI.
|
|
||||||
"""
|
|
||||||
# We don't use the method of checking for a tty (e.g. using isatty())
|
|
||||||
# because some CI systems mimic a tty (e.g. Travis CI). Thus that
|
|
||||||
# method doesn't provide definitive information in either direction.
|
|
||||||
return any(name in os.environ for name in CI_ENVIRONMENT_VARIABLES)
|
|
||||||
|
|
||||||
|
|
||||||
@functools.lru_cache(maxsize=1)
|
@functools.lru_cache(maxsize=1)
|
||||||
def user_agent() -> str:
|
def user_agent() -> str:
|
||||||
"""
|
"""
|
||||||
@@ -212,7 +187,7 @@ class LocalFSAdapter(BaseAdapter):
|
|||||||
self,
|
self,
|
||||||
request: PreparedRequest,
|
request: PreparedRequest,
|
||||||
stream: bool = False,
|
stream: bool = False,
|
||||||
timeout: float | tuple[float, float] | tuple[float, None] | None = None,
|
timeout: float | tuple[float | None, float | None] | None = None,
|
||||||
verify: bool | str = True,
|
verify: bool | str = True,
|
||||||
cert: bytes | str | tuple[bytes | str, bytes | str] | None = None,
|
cert: bytes | str | tuple[bytes | str, bytes | str] | None = None,
|
||||||
proxies: Mapping[str, str] | None = None,
|
proxies: Mapping[str, str] | None = None,
|
||||||
@@ -264,9 +239,11 @@ class _SSLContextAdapterMixin:
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
ssl_context: SSLContext | None = None,
|
ssl_context: SSLContext | None = None,
|
||||||
|
use_ssl_context_for_proxy: bool = True,
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
) -> None:
|
) -> None:
|
||||||
self._ssl_context = ssl_context
|
self._ssl_context = ssl_context
|
||||||
|
self._use_ssl_context_for_proxy = use_ssl_context_for_proxy
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
|
||||||
def init_poolmanager(
|
def init_poolmanager(
|
||||||
@@ -275,10 +252,10 @@ class _SSLContextAdapterMixin:
|
|||||||
maxsize: int,
|
maxsize: int,
|
||||||
block: bool = DEFAULT_POOLBLOCK,
|
block: bool = DEFAULT_POOLBLOCK,
|
||||||
**pool_kwargs: Any,
|
**pool_kwargs: Any,
|
||||||
) -> PoolManager:
|
) -> None:
|
||||||
if self._ssl_context is not None:
|
if self._ssl_context is not None:
|
||||||
pool_kwargs.setdefault("ssl_context", self._ssl_context)
|
pool_kwargs.setdefault("ssl_context", self._ssl_context)
|
||||||
return super().init_poolmanager( # type: ignore[misc, no-any-return]
|
super().init_poolmanager( # type: ignore[misc]
|
||||||
connections=connections,
|
connections=connections,
|
||||||
maxsize=maxsize,
|
maxsize=maxsize,
|
||||||
block=block,
|
block=block,
|
||||||
@@ -290,7 +267,10 @@ class _SSLContextAdapterMixin:
|
|||||||
# context here too. https://github.com/pypa/pip/issues/13288
|
# context here too. https://github.com/pypa/pip/issues/13288
|
||||||
if self._ssl_context is not None:
|
if self._ssl_context is not None:
|
||||||
proxy_kwargs.setdefault("ssl_context", self._ssl_context)
|
proxy_kwargs.setdefault("ssl_context", self._ssl_context)
|
||||||
return super().proxy_manager_for(proxy, **proxy_kwargs) # type: ignore[misc, no-any-return]
|
if self._use_ssl_context_for_proxy:
|
||||||
|
# Leave this unset when urllib3 must apply a custom proxy CA bundle.
|
||||||
|
proxy_kwargs.setdefault("proxy_ssl_context", self._ssl_context)
|
||||||
|
return super().proxy_manager_for(proxy, **proxy_kwargs) # type: ignore[misc]
|
||||||
|
|
||||||
|
|
||||||
class HTTPAdapter(_SSLContextAdapterMixin, _BaseHTTPAdapter):
|
class HTTPAdapter(_SSLContextAdapterMixin, _BaseHTTPAdapter):
|
||||||
@@ -335,6 +315,8 @@ class PipSession(requests.Session):
|
|||||||
trusted_hosts: Sequence[str] = (),
|
trusted_hosts: Sequence[str] = (),
|
||||||
index_urls: list[str] | None = None,
|
index_urls: list[str] | None = None,
|
||||||
ssl_context: SSLContext | None = None,
|
ssl_context: SSLContext | None = None,
|
||||||
|
use_ssl_context_for_proxy: bool = True,
|
||||||
|
refresh_package: set[str] | None = None,
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -346,11 +328,19 @@ class PipSession(requests.Session):
|
|||||||
# Namespace the attribute with "pip_" just in case to prevent
|
# Namespace the attribute with "pip_" just in case to prevent
|
||||||
# possible conflicts with the base class.
|
# possible conflicts with the base class.
|
||||||
self.pip_trusted_origins: list[tuple[str, int | None]] = []
|
self.pip_trusted_origins: list[tuple[str, int | None]] = []
|
||||||
self.pip_proxy = None
|
# "" disables proxying; None means no --proxy was given.
|
||||||
|
self.pip_proxy: str | None = None
|
||||||
|
self.pip_no_proxy_env = False
|
||||||
|
self.refresh_package: set[str] = refresh_package or set()
|
||||||
|
|
||||||
# Attach our User Agent to the request
|
# Attach our User Agent to the request
|
||||||
self.headers["User-Agent"] = user_agent()
|
self.headers["User-Agent"] = user_agent()
|
||||||
|
|
||||||
|
# Pin Accept-Encoding so it doesn't vary with zstd availability (Python
|
||||||
|
# 3.14+ or backports.zstd); a varying value misses the cache for "Vary:
|
||||||
|
# Accept-Encoding" responses shared across interpreters (pypa/pip#13979).
|
||||||
|
self.headers["Accept-Encoding"] = "gzip, deflate"
|
||||||
|
|
||||||
# Attach our Authentication handler to the session
|
# Attach our Authentication handler to the session
|
||||||
self.auth: MultiDomainBasicAuth = MultiDomainBasicAuth(index_urls=index_urls)
|
self.auth: MultiDomainBasicAuth = MultiDomainBasicAuth(index_urls=index_urls)
|
||||||
|
|
||||||
@@ -392,13 +382,18 @@ class PipSession(requests.Session):
|
|||||||
cache=SafeFileCache(cache),
|
cache=SafeFileCache(cache),
|
||||||
max_retries=retries,
|
max_retries=retries,
|
||||||
ssl_context=ssl_context,
|
ssl_context=ssl_context,
|
||||||
|
use_ssl_context_for_proxy=use_ssl_context_for_proxy,
|
||||||
)
|
)
|
||||||
self._trusted_host_adapter = InsecureCacheControlAdapter(
|
self._trusted_host_adapter = InsecureCacheControlAdapter(
|
||||||
cache=SafeFileCache(cache),
|
cache=SafeFileCache(cache),
|
||||||
max_retries=retries,
|
max_retries=retries,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
secure_adapter = HTTPAdapter(max_retries=retries, ssl_context=ssl_context)
|
secure_adapter = HTTPAdapter(
|
||||||
|
max_retries=retries,
|
||||||
|
ssl_context=ssl_context,
|
||||||
|
use_ssl_context_for_proxy=use_ssl_context_for_proxy,
|
||||||
|
)
|
||||||
self._trusted_host_adapter = insecure_adapter
|
self._trusted_host_adapter = insecure_adapter
|
||||||
|
|
||||||
self.mount("https://", secure_adapter)
|
self.mount("https://", secure_adapter)
|
||||||
@@ -522,6 +517,23 @@ class PipSession(requests.Session):
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def get_redirect_target(self, resp: Response) -> str | None:
|
||||||
|
target = super().get_redirect_target(resp)
|
||||||
|
if target is None:
|
||||||
|
return None
|
||||||
|
# Redirecting to a file:// URL doesn't make much sense and
|
||||||
|
# shouldn't be allowed.
|
||||||
|
scheme = urllib.parse.urlparse(target).scheme
|
||||||
|
if scheme and scheme.lower() not in ("http", "https"):
|
||||||
|
logger.warning(
|
||||||
|
"Not following redirect from %s to %s: a redirect to a non-http(s)"
|
||||||
|
" location is not allowed.",
|
||||||
|
redact_auth_from_url(resp.url),
|
||||||
|
redact_auth_from_url(target),
|
||||||
|
)
|
||||||
|
return None
|
||||||
|
return target
|
||||||
|
|
||||||
def request(self, method: str, url: str, *args: Any, **kwargs: Any) -> Response: # type: ignore[override]
|
def request(self, method: str, url: str, *args: Any, **kwargs: Any) -> Response: # type: ignore[override]
|
||||||
# Allow setting a default timeout on a session
|
# Allow setting a default timeout on a session
|
||||||
kwargs.setdefault("timeout", self.timeout)
|
kwargs.setdefault("timeout", self.timeout)
|
||||||
@@ -529,4 +541,15 @@ class PipSession(requests.Session):
|
|||||||
kwargs.setdefault("proxies", self.proxies)
|
kwargs.setdefault("proxies", self.proxies)
|
||||||
|
|
||||||
# Dispatch the actual request
|
# Dispatch the actual request
|
||||||
return super().request(method, url, *args, **kwargs)
|
try:
|
||||||
|
return super().request(method, url, *args, **kwargs)
|
||||||
|
except (requests.ConnectionError, requests.Timeout) as e:
|
||||||
|
request = getattr(e, "request", None)
|
||||||
|
failed_url = getattr(request, "url", None) or url
|
||||||
|
raise_connection_error(e, url=failed_url, timeout=kwargs["timeout"])
|
||||||
|
except ImportError as e:
|
||||||
|
if "ssl" in str(e).lower():
|
||||||
|
# Unfortunately, if this TLS error was the result of a redirect from
|
||||||
|
# a HTTP to a HTTPS url, we don't know what the final url was.
|
||||||
|
raise SSLMissingError(redact_auth_from_url(url))
|
||||||
|
raise
|
||||||
@@ -1,8 +1,23 @@
|
|||||||
from collections.abc import Generator
|
from collections.abc import Generator
|
||||||
|
from typing import Literal, NoReturn, TypeAlias, cast
|
||||||
|
from urllib.parse import urlsplit
|
||||||
|
|
||||||
|
from pip._vendor import requests, urllib3
|
||||||
from pip._vendor.requests.models import Response
|
from pip._vendor.requests.models import Response
|
||||||
|
from pip._vendor.urllib3.exceptions import TimeoutStateError
|
||||||
|
|
||||||
from pip._internal.exceptions import NetworkConnectionError
|
from pip._internal.exceptions import (
|
||||||
|
ConnectionFailedError,
|
||||||
|
ConnectionTimeoutError,
|
||||||
|
NetworkConnectionError,
|
||||||
|
ProxyConnectionError,
|
||||||
|
SSLVerificationError,
|
||||||
|
)
|
||||||
|
from pip._internal.utils.misc import redact_auth_from_url
|
||||||
|
|
||||||
|
TimeoutValue: TypeAlias = (
|
||||||
|
float | tuple[float | None, float | None] | urllib3.util.Timeout | None
|
||||||
|
)
|
||||||
|
|
||||||
# The following comments and HTTP headers were originally added by
|
# The following comments and HTTP headers were originally added by
|
||||||
# Donald Stufft in git commit 22c562429a61bb77172039e480873fb239dd8c03.
|
# Donald Stufft in git commit 22c562429a61bb77172039e480873fb239dd8c03.
|
||||||
@@ -96,3 +111,96 @@ def response_chunks(
|
|||||||
if not chunk:
|
if not chunk:
|
||||||
break
|
break
|
||||||
yield chunk
|
yield chunk
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_timeout(timeout: TimeoutValue, kind: Literal["connect", "read"]) -> float:
|
||||||
|
connect_timeout: float | None
|
||||||
|
read_timeout: float | None
|
||||||
|
if isinstance(timeout, tuple):
|
||||||
|
connect_timeout, read_timeout = timeout
|
||||||
|
elif isinstance(timeout, urllib3.util.Timeout):
|
||||||
|
connect_timeout = cast(float | None, timeout.connect_timeout)
|
||||||
|
try:
|
||||||
|
read_timeout = timeout.read_timeout
|
||||||
|
except TimeoutStateError:
|
||||||
|
read_timeout = None
|
||||||
|
else:
|
||||||
|
connect_timeout = read_timeout = timeout
|
||||||
|
|
||||||
|
if kind == "connect":
|
||||||
|
assert connect_timeout is not None
|
||||||
|
return connect_timeout
|
||||||
|
else:
|
||||||
|
assert read_timeout is not None
|
||||||
|
return read_timeout
|
||||||
|
|
||||||
|
|
||||||
|
def _raise_timeout_error(
|
||||||
|
reason: urllib3.exceptions.TimeoutError,
|
||||||
|
url: str,
|
||||||
|
host: str,
|
||||||
|
timeout: TimeoutValue,
|
||||||
|
) -> NoReturn:
|
||||||
|
if isinstance(reason, urllib3.exceptions.ConnectTimeoutError):
|
||||||
|
raise ConnectionTimeoutError(
|
||||||
|
url, host, kind="connect", timeout=_parse_timeout(timeout, "connect")
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
raise ConnectionTimeoutError(
|
||||||
|
url, host, kind="read", timeout=_parse_timeout(timeout, "read")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def raise_connection_error(
|
||||||
|
error: requests.ConnectionError | requests.Timeout,
|
||||||
|
*,
|
||||||
|
url: str,
|
||||||
|
timeout: TimeoutValue,
|
||||||
|
) -> NoReturn:
|
||||||
|
"""Raise a specific error for a given connection error, if possible.
|
||||||
|
|
||||||
|
Note: requests.ConnectionError is the parent class of
|
||||||
|
requests.ProxyError, requests.SSLError, and requests.ConnectTimeout
|
||||||
|
so these errors are also handled here.
|
||||||
|
"""
|
||||||
|
url = redact_auth_from_url(url)
|
||||||
|
raw_hostname = urlsplit(url).hostname or urlsplit(url).netloc
|
||||||
|
reason = error.args[0] if error.args else error
|
||||||
|
|
||||||
|
# NewConnectionError is a subclass of TimeoutError for some reason...
|
||||||
|
if isinstance(reason, urllib3.exceptions.TimeoutError) and not isinstance(
|
||||||
|
reason, urllib3.exceptions.NewConnectionError
|
||||||
|
):
|
||||||
|
# A bare timeout error can occur during non-streamed responses. Don't
|
||||||
|
# ask me how.
|
||||||
|
_raise_timeout_error(reason, url, raw_hostname, timeout)
|
||||||
|
if isinstance(reason, urllib3.exceptions.SSLError):
|
||||||
|
# A bare SSL error can occur during non-streamed responses, after the
|
||||||
|
# initial connection and TLS handshake have completed.
|
||||||
|
raise SSLVerificationError(url, raw_hostname, reason)
|
||||||
|
|
||||||
|
# At this point, all errors should be wrapped in MaxRetryError.
|
||||||
|
if not isinstance(reason, urllib3.exceptions.MaxRetryError):
|
||||||
|
raise ConnectionFailedError(url, raw_hostname, reason)
|
||||||
|
|
||||||
|
max_retry_error = reason
|
||||||
|
assert isinstance(max_retry_error.pool, urllib3.connectionpool.HTTPConnectionPool)
|
||||||
|
host = max_retry_error.pool.host
|
||||||
|
proxy = max_retry_error.pool.proxy
|
||||||
|
# Narrow the reason further to the specific error from the last retry.
|
||||||
|
reason = max_retry_error.reason
|
||||||
|
|
||||||
|
if isinstance(reason, urllib3.exceptions.SSLError):
|
||||||
|
raise SSLVerificationError(url, host, reason)
|
||||||
|
if isinstance(reason, urllib3.exceptions.TimeoutError) and not isinstance(
|
||||||
|
reason, urllib3.exceptions.NewConnectionError
|
||||||
|
):
|
||||||
|
_raise_timeout_error(reason, url, host, timeout)
|
||||||
|
if isinstance(reason, urllib3.exceptions.ProxyError):
|
||||||
|
assert proxy is not None
|
||||||
|
raise ProxyConnectionError(url, redact_auth_from_url(str(proxy)), reason)
|
||||||
|
|
||||||
|
# Unknown error, give up and raise a generic error.
|
||||||
|
raise ConnectionFailedError(
|
||||||
|
url, host, reason if isinstance(reason, Exception) else max_retry_error
|
||||||
|
)
|
||||||
@@ -3,12 +3,11 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from collections.abc import Generator, Iterable
|
from collections.abc import Callable, Generator, Iterable
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from email.parser import Parser
|
from email.parser import Parser
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
from typing import (
|
from typing import (
|
||||||
Callable,
|
|
||||||
NamedTuple,
|
NamedTuple,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -168,7 +167,7 @@ def _create_whitelist(
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
for req in package_set[package_name].dependencies:
|
for req in package_set[package_name].dependencies:
|
||||||
if canonicalize_name(req.name) in packages_affected:
|
if canonicalize_name(req.name) in would_be_installed:
|
||||||
packages_affected.add(package_name)
|
packages_affected.add(package_name)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
@@ -15,26 +15,25 @@ import sys
|
|||||||
import textwrap
|
import textwrap
|
||||||
import warnings
|
import warnings
|
||||||
from base64 import urlsafe_b64encode
|
from base64 import urlsafe_b64encode
|
||||||
from collections.abc import Generator, Iterable, Iterator, Sequence
|
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
|
||||||
from email.message import Message
|
from email.message import Message
|
||||||
from itertools import chain, filterfalse, starmap
|
from itertools import chain, filterfalse, starmap
|
||||||
|
from pathlib import Path
|
||||||
from typing import (
|
from typing import (
|
||||||
IO,
|
IO,
|
||||||
Any,
|
Any,
|
||||||
BinaryIO,
|
BinaryIO,
|
||||||
Callable,
|
|
||||||
NewType,
|
NewType,
|
||||||
Protocol,
|
Protocol,
|
||||||
Union,
|
|
||||||
cast,
|
cast,
|
||||||
)
|
)
|
||||||
from zipfile import ZipFile, ZipInfo
|
from zipfile import ZipFile, ZipInfo
|
||||||
|
|
||||||
from pip._vendor.distlib.scripts import ScriptMaker
|
from pip._vendor.distlib.scripts import ScriptMaker
|
||||||
from pip._vendor.distlib.util import get_export_entry
|
from pip._vendor.distlib.util import FileOperator, get_export_entry
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
|
|
||||||
from pip._internal.exceptions import InstallationError
|
from pip._internal.exceptions import BlockedImportError, InstallationError
|
||||||
from pip._internal.locations import get_major_minor_version
|
from pip._internal.locations import get_major_minor_version
|
||||||
from pip._internal.metadata import (
|
from pip._internal.metadata import (
|
||||||
BaseDistribution,
|
BaseDistribution,
|
||||||
@@ -59,6 +58,10 @@ class File(Protocol):
|
|||||||
dest_path: str
|
dest_path: str
|
||||||
changed: bool
|
changed: bool
|
||||||
|
|
||||||
|
@property
|
||||||
|
def written(self) -> bool:
|
||||||
|
pass
|
||||||
|
|
||||||
def save(self) -> None:
|
def save(self) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -66,7 +69,7 @@ class File(Protocol):
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
RecordPath = NewType("RecordPath", str)
|
RecordPath = NewType("RecordPath", str)
|
||||||
InstalledCSVRow = tuple[RecordPath, str, Union[int, str]]
|
InstalledCSVRow = tuple[RecordPath, str, int | str]
|
||||||
|
|
||||||
|
|
||||||
def rehash(path: str, blocksize: int = 1 << 20) -> tuple[str, str]:
|
def rehash(path: str, blocksize: int = 1 << 20) -> tuple[str, str]:
|
||||||
@@ -127,27 +130,33 @@ def message_about_scripts_not_on_PATH(scripts: Sequence[str]) -> str | None:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
# Group scripts by the path they were installed in
|
# Group scripts by the path they were installed in
|
||||||
grouped_by_dir: dict[str, set[str]] = collections.defaultdict(set)
|
grouped_by_dir: dict[Path, set[str]] = collections.defaultdict(set)
|
||||||
for destfile in scripts:
|
for destfile in scripts:
|
||||||
parent_dir = os.path.dirname(destfile)
|
dest_path = Path(destfile)
|
||||||
script_name = os.path.basename(destfile)
|
parent_dir = dest_path.parent.resolve()
|
||||||
|
script_name = dest_path.name
|
||||||
grouped_by_dir[parent_dir].add(script_name)
|
grouped_by_dir[parent_dir].add(script_name)
|
||||||
|
|
||||||
# We don't want to warn for directories that are on PATH.
|
|
||||||
not_warn_dirs = [
|
|
||||||
os.path.normcase(os.path.normpath(i)).rstrip(os.sep)
|
|
||||||
for i in os.environ.get("PATH", "").split(os.pathsep)
|
|
||||||
]
|
|
||||||
# If an executable sits with sys.executable, we don't warn for it.
|
# If an executable sits with sys.executable, we don't warn for it.
|
||||||
# This covers the case of venv invocations without activating the venv.
|
# This covers the case of venv invocations without activating the venv.
|
||||||
not_warn_dirs.append(
|
executable_dir = Path(sys.executable).parent.resolve()
|
||||||
os.path.normcase(os.path.normpath(os.path.dirname(sys.executable)))
|
path_entries = os.environ.get("PATH", "").split(os.pathsep)
|
||||||
)
|
|
||||||
warn_for: dict[str, set[str]] = {
|
# We don't want to warn for directories that are on PATH.
|
||||||
|
warn_for: dict[Path, set[str]] = {
|
||||||
parent_dir: scripts
|
parent_dir: scripts
|
||||||
for parent_dir, scripts in grouped_by_dir.items()
|
for parent_dir, scripts in grouped_by_dir.items()
|
||||||
if os.path.normcase(os.path.normpath(parent_dir)) not in not_warn_dirs
|
if parent_dir != executable_dir and str(parent_dir) not in path_entries
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Resolving PATH entries can be slow, so only do it for what's left.
|
||||||
|
if warn_for:
|
||||||
|
not_warn_dirs = {Path(i).resolve() for i in path_entries}
|
||||||
|
warn_for = {
|
||||||
|
parent_dir: scripts
|
||||||
|
for parent_dir, scripts in warn_for.items()
|
||||||
|
if parent_dir not in not_warn_dirs
|
||||||
|
}
|
||||||
if not warn_for:
|
if not warn_for:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -176,9 +185,7 @@ def message_about_scripts_not_on_PATH(scripts: Sequence[str]) -> str | None:
|
|||||||
msg_lines.append(last_line_fmt.format("these directories"))
|
msg_lines.append(last_line_fmt.format("these directories"))
|
||||||
|
|
||||||
# Add a note if any directory starts with ~
|
# Add a note if any directory starts with ~
|
||||||
warn_for_tilde = any(
|
warn_for_tilde = any(i[0] == "~" for i in path_entries if i)
|
||||||
i[0] == "~" for i in os.environ.get("PATH", "").split(os.pathsep) if i
|
|
||||||
)
|
|
||||||
if warn_for_tilde:
|
if warn_for_tilde:
|
||||||
tilde_warning_msg = (
|
tilde_warning_msg = (
|
||||||
"NOTE: The current PATH contains path(s) starting with `~`, "
|
"NOTE: The current PATH contains path(s) starting with `~`, "
|
||||||
@@ -345,6 +352,7 @@ class ZipBackedFile:
|
|||||||
self.dest_path = dest_path
|
self.dest_path = dest_path
|
||||||
self._zip_file = zip_file
|
self._zip_file = zip_file
|
||||||
self.changed = False
|
self.changed = False
|
||||||
|
self.written = False
|
||||||
|
|
||||||
def _getinfo(self) -> ZipInfo:
|
def _getinfo(self) -> ZipInfo:
|
||||||
return self._zip_file.getinfo(self.src_record_path)
|
return self._zip_file.getinfo(self.src_record_path)
|
||||||
@@ -366,6 +374,7 @@ class ZipBackedFile:
|
|||||||
# optimization: the file is created by open(),
|
# optimization: the file is created by open(),
|
||||||
# skip the decompression when there is 0 bytes to decompress.
|
# skip the decompression when there is 0 bytes to decompress.
|
||||||
with open(self.dest_path, "wb") as dest:
|
with open(self.dest_path, "wb") as dest:
|
||||||
|
self.written = True
|
||||||
if zipinfo.file_size > 0:
|
if zipinfo.file_size > 0:
|
||||||
with self._zip_file.open(zipinfo) as f:
|
with self._zip_file.open(zipinfo) as f:
|
||||||
blocksize = min(zipinfo.file_size, 1024 * 1024)
|
blocksize = min(zipinfo.file_size, 1024 * 1024)
|
||||||
@@ -382,6 +391,10 @@ class ScriptFile:
|
|||||||
self.dest_path = self._file.dest_path
|
self.dest_path = self._file.dest_path
|
||||||
self.changed = False
|
self.changed = False
|
||||||
|
|
||||||
|
@property
|
||||||
|
def written(self) -> bool:
|
||||||
|
return self._file.written
|
||||||
|
|
||||||
def save(self) -> None:
|
def save(self) -> None:
|
||||||
self._file.save()
|
self._file.save()
|
||||||
self.changed = fix_script(self.dest_path)
|
self.changed = fix_script(self.dest_path)
|
||||||
@@ -397,32 +410,171 @@ class MissingCallableSuffix(InstallationError):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _raise_for_invalid_entrypoint(specification: str) -> None:
|
def _raise_for_invalid_entrypoint(specification: str, scripts_dir: str) -> None:
|
||||||
entry = get_export_entry(specification)
|
entry = get_export_entry(specification)
|
||||||
if entry is not None and entry.suffix is None:
|
if entry is None:
|
||||||
|
return
|
||||||
|
|
||||||
|
if entry.suffix is None:
|
||||||
raise MissingCallableSuffix(str(entry))
|
raise MissingCallableSuffix(str(entry))
|
||||||
|
|
||||||
|
# distlib joins the entry point name onto the scripts directory, so a name
|
||||||
|
# with path separators or ``..`` components can resolve elsewhere. The script
|
||||||
|
# must resolve to a path strictly inside the scripts directory.
|
||||||
|
dest = os.path.join(scripts_dir, entry.name)
|
||||||
|
resolves_to_scripts_dir = os.path.abspath(dest) == os.path.abspath(scripts_dir)
|
||||||
|
if resolves_to_scripts_dir or not is_within_directory(scripts_dir, dest):
|
||||||
|
raise InstallationError(
|
||||||
|
f"Invalid script entry point name {entry.name!r}: the script "
|
||||||
|
f"would be installed outside the scripts directory ({scripts_dir})."
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class PipScriptMaker(ScriptMaker):
|
class PipScriptMaker(ScriptMaker):
|
||||||
# Override distlib's default script template with one that
|
# Override distlib's default script template with one that
|
||||||
# doesn't import `re` module, allowing scripts to load faster.
|
# doesn't import `re` module, allowing scripts to load faster.
|
||||||
script_template = textwrap.dedent(
|
script_template = textwrap.dedent("""\
|
||||||
"""\
|
|
||||||
import sys
|
import sys
|
||||||
from %(module)s import %(import_name)s
|
from %(module)s import %(import_name)s
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
||||||
sys.exit(%(func)s())
|
sys.exit(%(func)s())
|
||||||
"""
|
""")
|
||||||
)
|
|
||||||
|
|
||||||
def make(
|
def make(
|
||||||
self, specification: str, options: dict[str, Any] | None = None
|
self, specification: str, options: dict[str, Any] | None = None
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
_raise_for_invalid_entrypoint(specification)
|
_raise_for_invalid_entrypoint(specification, self.target_dir)
|
||||||
return super().make(specification, options)
|
return super().make(specification, options)
|
||||||
|
|
||||||
|
|
||||||
|
class _WheelInstallRecord:
|
||||||
|
"""Track files and metadata needed to recover an interrupted installation."""
|
||||||
|
|
||||||
|
def __init__(self, info_dir: str, lib_dir: str) -> None:
|
||||||
|
self.info_dir = info_dir
|
||||||
|
self.lib_dir = lib_dir
|
||||||
|
self.installed: dict[RecordPath, RecordPath] = {}
|
||||||
|
self.generated: list[str] = []
|
||||||
|
self.script_fileop = FileOperator()
|
||||||
|
self.script_fileop.record = True
|
||||||
|
self.started = False
|
||||||
|
|
||||||
|
def written_paths(self) -> set[str]:
|
||||||
|
"""Return the files written so far, including partial copies and scripts."""
|
||||||
|
paths = {os.path.join(self.lib_dir, path) for path in self.installed.values()}
|
||||||
|
paths.update(self.generated)
|
||||||
|
paths.update(self.script_fileop.files_written)
|
||||||
|
return paths
|
||||||
|
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def _generate_file(
|
||||||
|
path: str, file_mode: int, **kwargs: Any
|
||||||
|
) -> Generator[BinaryIO, None, None]:
|
||||||
|
"""Write metadata atomically with the requested permissions."""
|
||||||
|
temporary_path = None
|
||||||
|
try:
|
||||||
|
with adjacent_tmp_file(path, **kwargs) as f:
|
||||||
|
temporary_path = f.name
|
||||||
|
yield f
|
||||||
|
|
||||||
|
os.chmod(f.name, file_mode)
|
||||||
|
replace(f.name, path)
|
||||||
|
except BaseException:
|
||||||
|
if temporary_path is not None:
|
||||||
|
with contextlib.suppress(FileNotFoundError):
|
||||||
|
os.unlink(temporary_path)
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
def _write_recovery_record(wheel_zip: ZipFile, record: _WheelInstallRecord) -> None:
|
||||||
|
"""Write readable metadata and an uninstall record for files already written."""
|
||||||
|
info_dir, lib_dir = record.info_dir, record.lib_dir
|
||||||
|
file_mode = 0o666 & ~current_umask()
|
||||||
|
|
||||||
|
recovery_paths = {
|
||||||
|
_fs_to_record_path(path, lib_dir) for path in record.written_paths()
|
||||||
|
}
|
||||||
|
|
||||||
|
dest_info_dir = os.path.join(lib_dir, info_dir)
|
||||||
|
ensure_dir(dest_info_dir)
|
||||||
|
metadata_path = os.path.join(dest_info_dir, "METADATA")
|
||||||
|
with _generate_file(metadata_path, file_mode) as metadata_file:
|
||||||
|
metadata_file.write(wheel_zip.read(f"{info_dir}/METADATA"))
|
||||||
|
recovery_paths.add(_fs_to_record_path(metadata_path, lib_dir))
|
||||||
|
|
||||||
|
# Uninstall must not infer wrappers that were never generated.
|
||||||
|
with contextlib.suppress(FileNotFoundError):
|
||||||
|
os.unlink(os.path.join(dest_info_dir, "entry_points.txt"))
|
||||||
|
|
||||||
|
record_path = os.path.join(dest_info_dir, "RECORD")
|
||||||
|
recovery_paths.add(_fs_to_record_path(record_path, lib_dir))
|
||||||
|
with _generate_file(record_path, file_mode, **csv_io_kwargs("w")) as record_file:
|
||||||
|
writer = csv.writer(cast("IO[str]", record_file))
|
||||||
|
writer.writerows((path, "", "") for path in sorted(recovery_paths))
|
||||||
|
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def _record_wheel_installation(
|
||||||
|
wheel_zip: ZipFile, name: str, scheme: Scheme, *, rollback_on_error: bool = False
|
||||||
|
) -> Generator[_WheelInstallRecord, None, None]:
|
||||||
|
"""Provide the file journal and recover writes interrupted by blocked imports."""
|
||||||
|
info_dir, metadata = parse_wheel(wheel_zip, name)
|
||||||
|
lib_dir = scheme.purelib if wheel_root_is_purelib(metadata) else scheme.platlib
|
||||||
|
record = _WheelInstallRecord(info_dir, lib_dir)
|
||||||
|
|
||||||
|
try:
|
||||||
|
yield record
|
||||||
|
except BlockedImportError as error:
|
||||||
|
# A blocked preparation step must leave an existing install alone.
|
||||||
|
if not record.started:
|
||||||
|
raise
|
||||||
|
|
||||||
|
if rollback_on_error:
|
||||||
|
# Remove replacement files before the previous installation is restored.
|
||||||
|
try:
|
||||||
|
for path in record.written_paths():
|
||||||
|
with contextlib.suppress(FileNotFoundError):
|
||||||
|
os.unlink(path)
|
||||||
|
|
||||||
|
# Empty dist-info directories still look like installed distributions.
|
||||||
|
for directory, _, _ in os.walk(
|
||||||
|
os.path.join(lib_dir, info_dir), topdown=False
|
||||||
|
):
|
||||||
|
with contextlib.suppress(OSError):
|
||||||
|
os.rmdir(directory)
|
||||||
|
except (OSError, BlockedImportError) as cleanup_error:
|
||||||
|
raise BlockedImportError(
|
||||||
|
f"Could not remove incomplete installation of {name!r}: "
|
||||||
|
f"{cleanup_error}\n{error}"
|
||||||
|
) from cleanup_error
|
||||||
|
|
||||||
|
raise
|
||||||
|
|
||||||
|
try:
|
||||||
|
_write_recovery_record(wheel_zip, record)
|
||||||
|
except (OSError, BlockedImportError) as recovery_error:
|
||||||
|
raise BlockedImportError(
|
||||||
|
f"Could not write recovery metadata for {name!r} at "
|
||||||
|
f"{os.path.join(lib_dir, info_dir)!r}: {recovery_error}\n{error}"
|
||||||
|
) from recovery_error
|
||||||
|
|
||||||
|
raise BlockedImportError(
|
||||||
|
f"Installation of {name!r} was interrupted and the package may be "
|
||||||
|
f"corrupt. Run 'pip uninstall {name}' to remove it. {error}"
|
||||||
|
) from error
|
||||||
|
|
||||||
|
|
||||||
|
def _compile_wheel_file(path: str) -> bool:
|
||||||
|
"""Skip optional compilation when it requires a blocked or unavailable import."""
|
||||||
|
try:
|
||||||
|
return compileall.compile_file(path, force=True, quiet=True)
|
||||||
|
except (BlockedImportError, ImportError) as error:
|
||||||
|
logger.debug("Skipping bytecode compilation for %s: %s", path, error)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def _install_wheel( # noqa: C901, PLR0915 function is too long
|
def _install_wheel( # noqa: C901, PLR0915 function is too long
|
||||||
name: str,
|
name: str,
|
||||||
wheel_zip: ZipFile,
|
wheel_zip: ZipFile,
|
||||||
@@ -432,36 +584,33 @@ def _install_wheel( # noqa: C901, PLR0915 function is too long
|
|||||||
warn_script_location: bool = True,
|
warn_script_location: bool = True,
|
||||||
direct_url: DirectUrl | None = None,
|
direct_url: DirectUrl | None = None,
|
||||||
requested: bool = False,
|
requested: bool = False,
|
||||||
|
script_executable: str | None = None,
|
||||||
|
*,
|
||||||
|
record: _WheelInstallRecord,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Install a wheel.
|
"""Install a wheel.
|
||||||
|
|
||||||
:param name: Name of the project to install
|
:param name: Name of the project to install
|
||||||
:param wheel_zip: open ZipFile for wheel being installed
|
:param wheel_zip: open ZipFile for wheel being installed
|
||||||
:param scheme: Distutils scheme dictating the install directories
|
:param scheme: Distutils scheme dictating the install directories
|
||||||
:param req_description: String used in place of the requirement, for
|
|
||||||
logging
|
|
||||||
:param pycompile: Whether to byte-compile installed Python files
|
:param pycompile: Whether to byte-compile installed Python files
|
||||||
:param warn_script_location: Whether to check that scripts are installed
|
:param warn_script_location: Whether to check that scripts are installed
|
||||||
into a directory on PATH
|
into a directory on PATH
|
||||||
|
:param script_executable: Python executable to use for console scripts
|
||||||
:raises UnsupportedWheel:
|
:raises UnsupportedWheel:
|
||||||
* when the directory holds an unpacked wheel with incompatible
|
* when the directory holds an unpacked wheel with incompatible
|
||||||
Wheel-Version
|
Wheel-Version
|
||||||
* when the .dist-info dir does not match the wheel
|
* when the .dist-info dir does not match the wheel
|
||||||
"""
|
"""
|
||||||
info_dir, metadata = parse_wheel(wheel_zip, name)
|
info_dir, lib_dir = record.info_dir, record.lib_dir
|
||||||
|
|
||||||
if wheel_root_is_purelib(metadata):
|
|
||||||
lib_dir = scheme.purelib
|
|
||||||
else:
|
|
||||||
lib_dir = scheme.platlib
|
|
||||||
|
|
||||||
# Record details of the files moved
|
# Record details of the files moved
|
||||||
# installed = files copied from the wheel to the destination
|
# installed = files copied from the wheel to the destination
|
||||||
# changed = files changed while installing (scripts #! line typically)
|
# changed = files changed while installing (scripts #! line typically)
|
||||||
# generated = files newly generated during the install (script wrappers)
|
# generated = scripts and installation metadata generated during the install
|
||||||
installed: dict[RecordPath, RecordPath] = {}
|
installed = record.installed
|
||||||
changed: set[RecordPath] = set()
|
changed: set[RecordPath] = set()
|
||||||
generated: list[str] = []
|
generated = record.generated
|
||||||
|
|
||||||
def record_installed(
|
def record_installed(
|
||||||
srcfile: RecordPath, destfile: str, modified: bool = False
|
srcfile: RecordPath, destfile: str, modified: bool = False
|
||||||
@@ -582,6 +731,8 @@ def _install_wheel( # noqa: C901, PLR0915 function is too long
|
|||||||
script_scheme_files = map(ScriptFile, script_scheme_files)
|
script_scheme_files = map(ScriptFile, script_scheme_files)
|
||||||
files = chain(files, script_scheme_files)
|
files = chain(files, script_scheme_files)
|
||||||
|
|
||||||
|
# File saves may unlink old files before creating replacements.
|
||||||
|
record.started = True
|
||||||
existing_parents = set()
|
existing_parents = set()
|
||||||
for file in files:
|
for file in files:
|
||||||
# directory creation is lazy and after file filtering
|
# directory creation is lazy and after file filtering
|
||||||
@@ -591,7 +742,14 @@ def _install_wheel( # noqa: C901, PLR0915 function is too long
|
|||||||
if parent_dir not in existing_parents:
|
if parent_dir not in existing_parents:
|
||||||
ensure_dir(parent_dir)
|
ensure_dir(parent_dir)
|
||||||
existing_parents.add(parent_dir)
|
existing_parents.add(parent_dir)
|
||||||
file.save()
|
|
||||||
|
try:
|
||||||
|
file.save()
|
||||||
|
except BlockedImportError:
|
||||||
|
if file.written:
|
||||||
|
record_installed(file.src_record_path, file.dest_path, True)
|
||||||
|
raise
|
||||||
|
|
||||||
record_installed(file.src_record_path, file.dest_path, file.changed)
|
record_installed(file.src_record_path, file.dest_path, file.changed)
|
||||||
|
|
||||||
def pyc_source_file_paths() -> Generator[str, None, None]:
|
def pyc_source_file_paths() -> Generator[str, None, None]:
|
||||||
@@ -619,7 +777,7 @@ def _install_wheel( # noqa: C901, PLR0915 function is too long
|
|||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
warnings.filterwarnings("ignore")
|
warnings.filterwarnings("ignore")
|
||||||
for path in pyc_source_file_paths():
|
for path in pyc_source_file_paths():
|
||||||
success = compileall.compile_file(path, force=True, quiet=True)
|
success = _compile_wheel_file(path)
|
||||||
if success:
|
if success:
|
||||||
pyc_path = pyc_output_path(path)
|
pyc_path = pyc_output_path(path)
|
||||||
assert os.path.exists(pyc_path)
|
assert os.path.exists(pyc_path)
|
||||||
@@ -629,7 +787,14 @@ def _install_wheel( # noqa: C901, PLR0915 function is too long
|
|||||||
record_installed(pyc_record_path, pyc_path)
|
record_installed(pyc_record_path, pyc_path)
|
||||||
logger.debug(stdout.getvalue())
|
logger.debug(stdout.getvalue())
|
||||||
|
|
||||||
maker = PipScriptMaker(None, scheme.scripts)
|
# Track scripts even if generation fails before returning their paths.
|
||||||
|
maker = PipScriptMaker(None, scheme.scripts, fileop=record.script_fileop)
|
||||||
|
|
||||||
|
# Embed the target environment's interpreter in console-script launchers
|
||||||
|
# rather than the one running pip, so an in-process install into another
|
||||||
|
# environment (e.g. a venv build environment) produces working launchers.
|
||||||
|
if script_executable is not None:
|
||||||
|
maker.executable = script_executable # type: ignore # it's untyped in distlib
|
||||||
|
|
||||||
# Ensure old scripts are overwritten.
|
# Ensure old scripts are overwritten.
|
||||||
# See https://github.com/pypa/pip/issues/1800
|
# See https://github.com/pypa/pip/issues/1800
|
||||||
@@ -661,26 +826,18 @@ def _install_wheel( # noqa: C901, PLR0915 function is too long
|
|||||||
logger.warning(msg)
|
logger.warning(msg)
|
||||||
|
|
||||||
generated_file_mode = 0o666 & ~current_umask()
|
generated_file_mode = 0o666 & ~current_umask()
|
||||||
|
|
||||||
@contextlib.contextmanager
|
|
||||||
def _generate_file(path: str, **kwargs: Any) -> Generator[BinaryIO, None, None]:
|
|
||||||
with adjacent_tmp_file(path, **kwargs) as f:
|
|
||||||
yield f
|
|
||||||
os.chmod(f.name, generated_file_mode)
|
|
||||||
replace(f.name, path)
|
|
||||||
|
|
||||||
dest_info_dir = os.path.join(lib_dir, info_dir)
|
dest_info_dir = os.path.join(lib_dir, info_dir)
|
||||||
|
|
||||||
# Record pip as the installer
|
# Record pip as the installer
|
||||||
installer_path = os.path.join(dest_info_dir, "INSTALLER")
|
installer_path = os.path.join(dest_info_dir, "INSTALLER")
|
||||||
with _generate_file(installer_path) as installer_file:
|
with _generate_file(installer_path, generated_file_mode) as installer_file:
|
||||||
installer_file.write(b"pip\n")
|
installer_file.write(b"pip\n")
|
||||||
generated.append(installer_path)
|
generated.append(installer_path)
|
||||||
|
|
||||||
# Record the PEP 610 direct URL reference
|
# Record the PEP 610 direct URL reference
|
||||||
if direct_url is not None:
|
if direct_url is not None:
|
||||||
direct_url_path = os.path.join(dest_info_dir, DIRECT_URL_METADATA_NAME)
|
direct_url_path = os.path.join(dest_info_dir, DIRECT_URL_METADATA_NAME)
|
||||||
with _generate_file(direct_url_path) as direct_url_file:
|
with _generate_file(direct_url_path, generated_file_mode) as direct_url_file:
|
||||||
direct_url_file.write(direct_url.to_json().encode("utf-8"))
|
direct_url_file.write(direct_url.to_json().encode("utf-8"))
|
||||||
generated.append(direct_url_path)
|
generated.append(direct_url_path)
|
||||||
|
|
||||||
@@ -694,9 +851,10 @@ def _install_wheel( # noqa: C901, PLR0915 function is too long
|
|||||||
record_text = distribution.read_text("RECORD")
|
record_text = distribution.read_text("RECORD")
|
||||||
record_rows = list(csv.reader(record_text.splitlines()))
|
record_rows = list(csv.reader(record_text.splitlines()))
|
||||||
|
|
||||||
|
# RECORD generation consumes its input; recovery still needs the journal.
|
||||||
rows = get_csv_rows_for_installed(
|
rows = get_csv_rows_for_installed(
|
||||||
record_rows,
|
record_rows,
|
||||||
installed=installed,
|
installed=installed.copy(),
|
||||||
changed=changed,
|
changed=changed,
|
||||||
generated=generated,
|
generated=generated,
|
||||||
lib_dir=lib_dir,
|
lib_dir=lib_dir,
|
||||||
@@ -705,7 +863,9 @@ def _install_wheel( # noqa: C901, PLR0915 function is too long
|
|||||||
# Record details of all files installed
|
# Record details of all files installed
|
||||||
record_path = os.path.join(dest_info_dir, "RECORD")
|
record_path = os.path.join(dest_info_dir, "RECORD")
|
||||||
|
|
||||||
with _generate_file(record_path, **csv_io_kwargs("w")) as record_file:
|
with _generate_file(
|
||||||
|
record_path, generated_file_mode, **csv_io_kwargs("w")
|
||||||
|
) as record_file:
|
||||||
# Explicitly cast to typing.IO[str] as a workaround for the mypy error:
|
# Explicitly cast to typing.IO[str] as a workaround for the mypy error:
|
||||||
# "writer" has incompatible type "BinaryIO"; expected "_Writer"
|
# "writer" has incompatible type "BinaryIO"; expected "_Writer"
|
||||||
writer = csv.writer(cast("IO[str]", record_file))
|
writer = csv.writer(cast("IO[str]", record_file))
|
||||||
@@ -730,9 +890,17 @@ def install_wheel(
|
|||||||
warn_script_location: bool = True,
|
warn_script_location: bool = True,
|
||||||
direct_url: DirectUrl | None = None,
|
direct_url: DirectUrl | None = None,
|
||||||
requested: bool = False,
|
requested: bool = False,
|
||||||
|
script_executable: str | None = None,
|
||||||
|
*,
|
||||||
|
rollback_on_error: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
with ZipFile(wheel_path, allowZip64=True) as z:
|
with ZipFile(wheel_path, allowZip64=True) as z:
|
||||||
with req_error_context(req_description):
|
with (
|
||||||
|
req_error_context(req_description),
|
||||||
|
_record_wheel_installation(
|
||||||
|
z, name, scheme, rollback_on_error=rollback_on_error
|
||||||
|
) as record,
|
||||||
|
):
|
||||||
_install_wheel(
|
_install_wheel(
|
||||||
name=name,
|
name=name,
|
||||||
wheel_zip=z,
|
wheel_zip=z,
|
||||||
@@ -742,4 +910,6 @@ def install_wheel(
|
|||||||
warn_script_location=warn_script_location,
|
warn_script_location=warn_script_location,
|
||||||
direct_url=direct_url,
|
direct_url=direct_url,
|
||||||
requested=requested,
|
requested=requested,
|
||||||
|
script_executable=script_executable,
|
||||||
|
record=record,
|
||||||
)
|
)
|
||||||
@@ -12,9 +12,10 @@ from dataclasses import dataclass
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
|
|
||||||
from pip._internal.build_env import BuildEnvironmentInstaller
|
from pip._internal.build_env import BuildEnvironmentInstaller, BuildIsolationMode
|
||||||
from pip._internal.distributions import make_distribution_for_install_requirement
|
from pip._internal.distributions import make_distribution_for_install_requirement
|
||||||
from pip._internal.distributions.installed import InstalledDistribution
|
from pip._internal.distributions.installed import InstalledDistribution
|
||||||
from pip._internal.exceptions import (
|
from pip._internal.exceptions import (
|
||||||
@@ -23,13 +24,16 @@ from pip._internal.exceptions import (
|
|||||||
HashUnpinned,
|
HashUnpinned,
|
||||||
InstallationError,
|
InstallationError,
|
||||||
MetadataInconsistent,
|
MetadataInconsistent,
|
||||||
|
MetadataInvalid,
|
||||||
NetworkConnectionError,
|
NetworkConnectionError,
|
||||||
|
SidecarMetadataInconsistent,
|
||||||
VcsHashUnsupported,
|
VcsHashUnsupported,
|
||||||
)
|
)
|
||||||
from pip._internal.index.package_finder import PackageFinder
|
from pip._internal.index.package_finder import PackageFinder
|
||||||
from pip._internal.metadata import BaseDistribution, get_metadata_distribution
|
from pip._internal.metadata import BaseDistribution, get_metadata_distribution
|
||||||
from pip._internal.models.direct_url import ArchiveInfo
|
from pip._internal.metadata.direct_references import check_pypi_direct_references
|
||||||
from pip._internal.models.link import Link
|
from pip._internal.models.direct_url import ArchiveInfo, DirectUrl
|
||||||
|
from pip._internal.models.link import Link, join_within_directory
|
||||||
from pip._internal.models.wheel import Wheel
|
from pip._internal.models.wheel import Wheel
|
||||||
from pip._internal.network.download import Downloader
|
from pip._internal.network.download import Downloader
|
||||||
from pip._internal.network.lazy_wheel import (
|
from pip._internal.network.lazy_wheel import (
|
||||||
@@ -52,6 +56,7 @@ from pip._internal.utils.misc import (
|
|||||||
hide_url,
|
hide_url,
|
||||||
redact_auth_from_requirement,
|
redact_auth_from_requirement,
|
||||||
)
|
)
|
||||||
|
from pip._internal.utils.packaging import get_requirement
|
||||||
from pip._internal.utils.temp_dir import TempDirectory
|
from pip._internal.utils.temp_dir import TempDirectory
|
||||||
from pip._internal.utils.unpacking import unpack_file
|
from pip._internal.utils.unpacking import unpack_file
|
||||||
from pip._internal.vcs import vcs
|
from pip._internal.vcs import vcs
|
||||||
@@ -66,8 +71,9 @@ def _get_prepared_distribution(
|
|||||||
req: InstallRequirement,
|
req: InstallRequirement,
|
||||||
build_tracker: BuildTracker,
|
build_tracker: BuildTracker,
|
||||||
build_env_installer: BuildEnvironmentInstaller,
|
build_env_installer: BuildEnvironmentInstaller,
|
||||||
build_isolation: bool,
|
build_isolation: BuildIsolationMode,
|
||||||
check_build_deps: bool,
|
check_build_deps: bool,
|
||||||
|
allow_editables: bool,
|
||||||
) -> BaseDistribution:
|
) -> BaseDistribution:
|
||||||
"""Prepare a distribution for installation."""
|
"""Prepare a distribution for installation."""
|
||||||
abstract_dist = make_distribution_for_install_requirement(req)
|
abstract_dist = make_distribution_for_install_requirement(req)
|
||||||
@@ -75,11 +81,22 @@ def _get_prepared_distribution(
|
|||||||
if tracker_id is not None:
|
if tracker_id is not None:
|
||||||
with build_tracker.track(req, tracker_id):
|
with build_tracker.track(req, tracker_id):
|
||||||
abstract_dist.prepare_distribution_metadata(
|
abstract_dist.prepare_distribution_metadata(
|
||||||
build_env_installer, build_isolation, check_build_deps
|
build_env_installer, build_isolation, check_build_deps, allow_editables
|
||||||
)
|
)
|
||||||
return abstract_dist.get_metadata_distribution()
|
return abstract_dist.get_metadata_distribution()
|
||||||
|
|
||||||
|
|
||||||
|
def _check_linked_requirement_metadata(
|
||||||
|
req: InstallRequirement,
|
||||||
|
distribution: BaseDistribution,
|
||||||
|
) -> None:
|
||||||
|
"""Apply source-dependent checks to prepared metadata."""
|
||||||
|
source_link = req.source_link
|
||||||
|
if source_link is None:
|
||||||
|
raise InstallationError(f"Cannot prepare {req}: the source link is missing.")
|
||||||
|
check_pypi_direct_references(distribution, source_link)
|
||||||
|
|
||||||
|
|
||||||
def unpack_vcs_link(link: Link, location: str, verbosity: int) -> None:
|
def unpack_vcs_link(link: Link, location: str, verbosity: int) -> None:
|
||||||
vcs_backend = vcs.get_backend_for_scheme(link.scheme)
|
vcs_backend = vcs.get_backend_for_scheme(link.scheme)
|
||||||
assert vcs_backend is not None
|
assert vcs_backend is not None
|
||||||
@@ -201,7 +218,7 @@ def _check_download_dir(
|
|||||||
"""Check download_dir for previously downloaded file with correct hash
|
"""Check download_dir for previously downloaded file with correct hash
|
||||||
If a correct file is found return its path else None
|
If a correct file is found return its path else None
|
||||||
"""
|
"""
|
||||||
download_path = os.path.join(download_dir, link.filename)
|
download_path = join_within_directory(download_dir, link.filename)
|
||||||
|
|
||||||
if not os.path.exists(download_path):
|
if not os.path.exists(download_path):
|
||||||
return None
|
return None
|
||||||
@@ -222,6 +239,91 @@ def _check_download_dir(
|
|||||||
return download_path
|
return download_path
|
||||||
|
|
||||||
|
|
||||||
|
def _canonical_requires(
|
||||||
|
req: InstallRequirement, dist: BaseDistribution, source: str
|
||||||
|
) -> frozenset[Requirement]:
|
||||||
|
"""Return the canonicalized ``Requires-Dist`` entries of ``dist``.
|
||||||
|
|
||||||
|
``source`` describes which metadata file ``dist`` was parsed from, for
|
||||||
|
use in error messages.
|
||||||
|
"""
|
||||||
|
canonical = set()
|
||||||
|
for raw in dist.iter_raw_dependencies():
|
||||||
|
try:
|
||||||
|
# strip() because a folded metadata header may be returned
|
||||||
|
# with a leading newline; iter_dependencies() strips for the
|
||||||
|
# same reason.
|
||||||
|
canonical.add(get_requirement(raw.strip()))
|
||||||
|
except InvalidRequirement as e:
|
||||||
|
raise MetadataInvalid(req, f"Requires-Dist in {source}: {e}")
|
||||||
|
return frozenset(canonical)
|
||||||
|
|
||||||
|
|
||||||
|
def _check_sidecar_matches_wheel(
|
||||||
|
req: InstallRequirement,
|
||||||
|
sidecar_dist: BaseDistribution,
|
||||||
|
wheel_dist: BaseDistribution,
|
||||||
|
) -> None:
|
||||||
|
"""Check that a .metadata-based distribution matches the wheel's METADATA.
|
||||||
|
|
||||||
|
Compare ``Name``, ``Version``, ``Requires-Dist``, ``Requires-Python``
|
||||||
|
and ``Provides-Extra`` between the two and abort the install on any
|
||||||
|
mismatch as PEP 658 requires the metadata files "MUST be identical".
|
||||||
|
|
||||||
|
While the PEP doesn't mandate that consumers enforce the identical
|
||||||
|
requirement, it's good nonetheless to check to prevent confusing
|
||||||
|
behaviour when an index misbehaves.
|
||||||
|
|
||||||
|
Also note for name and version, pip usually rejects wheels if they're
|
||||||
|
inconsistent already. Checking them again here is purely defensive.
|
||||||
|
"""
|
||||||
|
|
||||||
|
sidecar_name = canonicalize_name(sidecar_dist.raw_name)
|
||||||
|
wheel_name = canonicalize_name(wheel_dist.raw_name)
|
||||||
|
if sidecar_name != wheel_name:
|
||||||
|
raise SidecarMetadataInconsistent(req, "Name", sidecar_name, wheel_name)
|
||||||
|
|
||||||
|
if sidecar_dist.version != wheel_dist.version:
|
||||||
|
raise SidecarMetadataInconsistent(
|
||||||
|
req,
|
||||||
|
"Version",
|
||||||
|
str(sidecar_dist.version),
|
||||||
|
str(wheel_dist.version),
|
||||||
|
)
|
||||||
|
|
||||||
|
# For multi-use fields, only report the symmetric difference to avoid
|
||||||
|
# unnecessarily flagging matching values.
|
||||||
|
sidecar_requires = _canonical_requires(
|
||||||
|
req, sidecar_dist, "the PEP 658 .metadata file"
|
||||||
|
)
|
||||||
|
wheel_requires = _canonical_requires(req, wheel_dist, "the wheel's METADATA")
|
||||||
|
if sidecar_requires != wheel_requires:
|
||||||
|
raise SidecarMetadataInconsistent(
|
||||||
|
req,
|
||||||
|
"Requires-Dist",
|
||||||
|
", ".join(sorted(map(str, sidecar_requires - wheel_requires))),
|
||||||
|
", ".join(sorted(map(str, wheel_requires - sidecar_requires))),
|
||||||
|
)
|
||||||
|
|
||||||
|
if sidecar_dist.requires_python != wheel_dist.requires_python:
|
||||||
|
raise SidecarMetadataInconsistent(
|
||||||
|
req,
|
||||||
|
"Requires-Python",
|
||||||
|
str(sidecar_dist.requires_python),
|
||||||
|
str(wheel_dist.requires_python),
|
||||||
|
)
|
||||||
|
|
||||||
|
sidecar_extras = frozenset(sidecar_dist.iter_provided_extras())
|
||||||
|
wheel_extras = frozenset(wheel_dist.iter_provided_extras())
|
||||||
|
if sidecar_extras != wheel_extras:
|
||||||
|
raise SidecarMetadataInconsistent(
|
||||||
|
req,
|
||||||
|
"Provides-Extra",
|
||||||
|
", ".join(sorted(sidecar_extras - wheel_extras)),
|
||||||
|
", ".join(sorted(wheel_extras - sidecar_extras)),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class RequirementPreparer:
|
class RequirementPreparer:
|
||||||
"""Prepares a Requirement"""
|
"""Prepares a Requirement"""
|
||||||
|
|
||||||
@@ -231,7 +333,7 @@ class RequirementPreparer:
|
|||||||
build_dir: str,
|
build_dir: str,
|
||||||
download_dir: str | None,
|
download_dir: str | None,
|
||||||
src_dir: str,
|
src_dir: str,
|
||||||
build_isolation: bool,
|
build_isolation: BuildIsolationMode,
|
||||||
build_isolation_installer: BuildEnvironmentInstaller,
|
build_isolation_installer: BuildEnvironmentInstaller,
|
||||||
check_build_deps: bool,
|
check_build_deps: bool,
|
||||||
build_tracker: BuildTracker,
|
build_tracker: BuildTracker,
|
||||||
@@ -243,6 +345,7 @@ class RequirementPreparer:
|
|||||||
lazy_wheel: bool,
|
lazy_wheel: bool,
|
||||||
verbosity: int,
|
verbosity: int,
|
||||||
legacy_resolver: bool,
|
legacy_resolver: bool,
|
||||||
|
allow_editables: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
@@ -285,6 +388,10 @@ class RequirementPreparer:
|
|||||||
# Previous "header" printed for a link-based InstallRequirement
|
# Previous "header" printed for a link-based InstallRequirement
|
||||||
self._previous_requirement_header = ("", "")
|
self._previous_requirement_header = ("", "")
|
||||||
|
|
||||||
|
# Do we allow preparing editable wheels?
|
||||||
|
# When using pip wheel, editables must still produce regular wheels
|
||||||
|
self.allow_editables = allow_editables
|
||||||
|
|
||||||
def _log_preparing_link(self, req: InstallRequirement) -> None:
|
def _log_preparing_link(self, req: InstallRequirement) -> None:
|
||||||
"""Provide context for the requirement being prepared."""
|
"""Provide context for the requirement being prepared."""
|
||||||
if req.link.is_file and not req.is_wheel_from_cache:
|
if req.link.is_file and not req.is_wheel_from_cache:
|
||||||
@@ -342,7 +449,8 @@ class RequirementPreparer:
|
|||||||
# (For example, we can raise VcsHashUnsupported for a VCS URL
|
# (For example, we can raise VcsHashUnsupported for a VCS URL
|
||||||
# rather than HashMissing.)
|
# rather than HashMissing.)
|
||||||
if not self.require_hashes:
|
if not self.require_hashes:
|
||||||
return req.hashes(trust_internet=True)
|
# An index-provided hash must not override one supplied by the user.
|
||||||
|
return req.hashes(trust_internet=not req.has_hash_options)
|
||||||
|
|
||||||
# We could check these first 2 conditions inside unpack_url
|
# We could check these first 2 conditions inside unpack_url
|
||||||
# and save repetition of conditions, but then we would
|
# and save repetition of conditions, but then we would
|
||||||
@@ -529,6 +637,7 @@ class RequirementPreparer:
|
|||||||
# The file is not available, attempt to fetch only metadata
|
# The file is not available, attempt to fetch only metadata
|
||||||
metadata_dist = self._fetch_metadata_only(req)
|
metadata_dist = self._fetch_metadata_only(req)
|
||||||
if metadata_dist is not None:
|
if metadata_dist is not None:
|
||||||
|
_check_linked_requirement_metadata(req, metadata_dist)
|
||||||
req.needs_more_preparation = True
|
req.needs_more_preparation = True
|
||||||
req.set_dist(metadata_dist)
|
req.set_dist(metadata_dist)
|
||||||
# Ensure download_info is available even in dry-run mode
|
# Ensure download_info is available even in dry-run mode
|
||||||
@@ -586,9 +695,9 @@ class RequirementPreparer:
|
|||||||
# We need to verify hashes, and we have found the requirement in the cache
|
# We need to verify hashes, and we have found the requirement in the cache
|
||||||
# of locally built wheels.
|
# of locally built wheels.
|
||||||
if (
|
if (
|
||||||
isinstance(req.download_info.info, ArchiveInfo)
|
req.download_info.archive_info
|
||||||
and req.download_info.info.hashes
|
and req.download_info.archive_info.hashes
|
||||||
and hashes.has_one_of(req.download_info.info.hashes)
|
and hashes.has_one_of(req.download_info.archive_info.hashes)
|
||||||
):
|
):
|
||||||
# At this point we know the requirement was built from a hashable source
|
# At this point we know the requirement was built from a hashable source
|
||||||
# artifact, and we verified that the cache entry's hash of the original
|
# artifact, and we verified that the cache entry's hash of the original
|
||||||
@@ -640,14 +749,18 @@ class RequirementPreparer:
|
|||||||
# compute it from the downloaded file.
|
# compute it from the downloaded file.
|
||||||
# FIXME: https://github.com/pypa/pip/issues/11943
|
# FIXME: https://github.com/pypa/pip/issues/11943
|
||||||
if (
|
if (
|
||||||
isinstance(req.download_info.info, ArchiveInfo)
|
req.download_info.archive_info
|
||||||
and not req.download_info.info.hashes
|
and not req.download_info.archive_info.hashes
|
||||||
and local_file
|
and local_file
|
||||||
):
|
):
|
||||||
hash = hash_file(local_file.path)[0].hexdigest()
|
hash = hash_file(local_file.path)[0].hexdigest()
|
||||||
# We populate info.hash for backward compatibility.
|
# We populate archive_info.hashes. For backward compatibility,
|
||||||
# This will automatically populate info.hashes.
|
# the legacy hash field will be generated when converting to JSON.
|
||||||
req.download_info.info.hash = f"sha256={hash}"
|
req.download_info = DirectUrl(
|
||||||
|
url=req.download_info.url,
|
||||||
|
archive_info=ArchiveInfo(hashes={"sha256": hash}),
|
||||||
|
subdirectory=req.download_info.subdirectory,
|
||||||
|
)
|
||||||
|
|
||||||
# For use in later processing,
|
# For use in later processing,
|
||||||
# preserve the file path on the requirement.
|
# preserve the file path on the requirement.
|
||||||
@@ -660,7 +773,30 @@ class RequirementPreparer:
|
|||||||
self.build_env_installer,
|
self.build_env_installer,
|
||||||
self.build_isolation,
|
self.build_isolation,
|
||||||
self.check_build_deps,
|
self.check_build_deps,
|
||||||
|
self.allow_editables,
|
||||||
)
|
)
|
||||||
|
_check_linked_requirement_metadata(req, dist)
|
||||||
|
|
||||||
|
# If a PEP 658 .metadata file was used, check that fields relevant for
|
||||||
|
# dependency resolution match with the wheel's METADATA file.
|
||||||
|
#
|
||||||
|
# NOTE: PEP 658 also permits .metadata files for source distributions,
|
||||||
|
# but PyPI doesn't serve such files. In addition, an sdist's metadata
|
||||||
|
# is generated at build time and may legitimately differ from what the
|
||||||
|
# index declared, so it's been decided to skip this check for sdists.
|
||||||
|
# This can change later if needed.
|
||||||
|
#
|
||||||
|
# TODO: this is a hack for checking whether a distribution is metadata-
|
||||||
|
# only or not. If/when we refactor distributions to delineate between
|
||||||
|
# metadata-only and concrete distributions, clean this up.
|
||||||
|
if (
|
||||||
|
link.is_wheel
|
||||||
|
and req._distribution is not None
|
||||||
|
and req._distribution is not dist
|
||||||
|
and link.metadata_link() is not None
|
||||||
|
):
|
||||||
|
_check_sidecar_matches_wheel(req, req._distribution, dist)
|
||||||
|
|
||||||
return dist
|
return dist
|
||||||
|
|
||||||
def save_linked_requirement(self, req: InstallRequirement) -> None:
|
def save_linked_requirement(self, req: InstallRequirement) -> None:
|
||||||
@@ -683,7 +819,7 @@ class RequirementPreparer:
|
|||||||
# No distribution was downloaded for this requirement.
|
# No distribution was downloaded for this requirement.
|
||||||
return
|
return
|
||||||
|
|
||||||
download_location = os.path.join(self.download_dir, link.filename)
|
download_location = join_within_directory(self.download_dir, link.filename)
|
||||||
if not os.path.exists(download_location):
|
if not os.path.exists(download_location):
|
||||||
shutil.copy(req.local_file_path, download_location)
|
shutil.copy(req.local_file_path, download_location)
|
||||||
download_path = display_path(download_location)
|
download_path = display_path(download_location)
|
||||||
@@ -716,6 +852,7 @@ class RequirementPreparer:
|
|||||||
self.build_env_installer,
|
self.build_env_installer,
|
||||||
self.build_isolation,
|
self.build_isolation,
|
||||||
self.check_build_deps,
|
self.check_build_deps,
|
||||||
|
self.allow_editables,
|
||||||
)
|
)
|
||||||
|
|
||||||
req.check_if_exists(self.use_user_site)
|
req.check_if_exists(self.use_user_site)
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ def install_given_reqs(
|
|||||||
use_user_site: bool,
|
use_user_site: bool,
|
||||||
pycompile: bool,
|
pycompile: bool,
|
||||||
progress_bar: BarType,
|
progress_bar: BarType,
|
||||||
|
script_executable: str | None = None,
|
||||||
) -> list[InstallationResult]:
|
) -> list[InstallationResult]:
|
||||||
"""
|
"""
|
||||||
Install everything in the given list.
|
Install everything in the given list.
|
||||||
@@ -73,6 +74,7 @@ def install_given_reqs(
|
|||||||
for requirement in items:
|
for requirement in items:
|
||||||
req_name = requirement.name
|
req_name = requirement.name
|
||||||
assert req_name is not None
|
assert req_name is not None
|
||||||
|
|
||||||
if requirement.should_reinstall:
|
if requirement.should_reinstall:
|
||||||
logger.info("Attempting uninstall: %s", req_name)
|
logger.info("Attempting uninstall: %s", req_name)
|
||||||
with indent_log():
|
with indent_log():
|
||||||
@@ -88,6 +90,10 @@ def install_given_reqs(
|
|||||||
warn_script_location=warn_script_location,
|
warn_script_location=warn_script_location,
|
||||||
use_user_site=use_user_site,
|
use_user_site=use_user_site,
|
||||||
pycompile=pycompile,
|
pycompile=pycompile,
|
||||||
|
script_executable=script_executable,
|
||||||
|
rollback_on_error=bool(
|
||||||
|
uninstalled_pathset and uninstalled_pathset.can_rollback
|
||||||
|
),
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
# if install did not succeed, rollback previous uninstall
|
# if install did not succeed, rollback previous uninstall
|
||||||
|
|||||||
@@ -14,15 +14,15 @@ import copy
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from collections.abc import Collection
|
from collections.abc import Collection, Mapping
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from pip._vendor.packaging.markers import Marker
|
from pip._vendor.packaging import pylock
|
||||||
|
from pip._vendor.packaging.markers import InvalidMarker, Marker
|
||||||
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement
|
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement
|
||||||
from pip._vendor.packaging.specifiers import Specifier
|
from pip._vendor.packaging.utils import parse_sdist_filename, parse_wheel_filename
|
||||||
|
|
||||||
from pip._internal.exceptions import InstallationError
|
from pip._internal.exceptions import InstallationError
|
||||||
from pip._internal.models.index import PyPI, TestPyPI
|
|
||||||
from pip._internal.models.link import Link
|
from pip._internal.models.link import Link
|
||||||
from pip._internal.models.wheel import Wheel
|
from pip._internal.models.wheel import Wheel
|
||||||
from pip._internal.req.req_file import ParsedRequirement
|
from pip._internal.req.req_file import ParsedRequirement
|
||||||
@@ -30,7 +30,14 @@ from pip._internal.req.req_install import InstallRequirement
|
|||||||
from pip._internal.utils.filetypes import is_archive_file
|
from pip._internal.utils.filetypes import is_archive_file
|
||||||
from pip._internal.utils.misc import is_installable_dir
|
from pip._internal.utils.misc import is_installable_dir
|
||||||
from pip._internal.utils.packaging import get_requirement
|
from pip._internal.utils.packaging import get_requirement
|
||||||
from pip._internal.utils.urls import path_to_url
|
from pip._internal.utils.pylock import (
|
||||||
|
package_archive_requirement_url,
|
||||||
|
package_directory_requirement_url,
|
||||||
|
package_sdist_requirement_url,
|
||||||
|
package_vcs_requirement_url,
|
||||||
|
package_wheel_requirement_url,
|
||||||
|
)
|
||||||
|
from pip._internal.utils.urls import path_to_url, strip_extras
|
||||||
from pip._internal.vcs import is_url, vcs
|
from pip._internal.vcs import is_url, vcs
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
@@ -40,25 +47,10 @@ __all__ = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
operators = Specifier._operators.keys()
|
|
||||||
|
|
||||||
|
# All standard version specifier operators
|
||||||
def _strip_extras(path: str) -> tuple[str, str | None]:
|
# https://packaging.python.org/en/latest/specifications/version-specifiers/#id5
|
||||||
m = re.match(r"^(.+)(\[[^\]]+\])$", path)
|
operators = ("~=", "==", "!=", "<=", ">=", "<", ">", "===")
|
||||||
extras = None
|
|
||||||
if m:
|
|
||||||
path_no_extras = m.group(1).rstrip()
|
|
||||||
extras = m.group(2)
|
|
||||||
else:
|
|
||||||
path_no_extras = path
|
|
||||||
|
|
||||||
return path_no_extras, extras
|
|
||||||
|
|
||||||
|
|
||||||
def convert_extras(extras: str | None) -> set[str]:
|
|
||||||
if not extras:
|
|
||||||
return set()
|
|
||||||
return get_requirement("placeholder" + extras.lower()).extras
|
|
||||||
|
|
||||||
|
|
||||||
def _set_requirement_extras(req: Requirement, new_extras: set[str]) -> Requirement:
|
def _set_requirement_extras(req: Requirement, new_extras: set[str]) -> Requirement:
|
||||||
@@ -108,7 +100,7 @@ def _parse_pip_syntax_editable(editable_req: str) -> tuple[str | None, str, set[
|
|||||||
url = editable_req
|
url = editable_req
|
||||||
|
|
||||||
# If a file path is specified with extras, strip off the extras.
|
# If a file path is specified with extras, strip off the extras.
|
||||||
url_no_extras, extras = _strip_extras(url)
|
url_no_extras, extras = strip_extras(url)
|
||||||
|
|
||||||
if os.path.isdir(url_no_extras):
|
if os.path.isdir(url_no_extras):
|
||||||
# Treating it as code that has already been checked out
|
# Treating it as code that has already been checked out
|
||||||
@@ -116,14 +108,7 @@ def _parse_pip_syntax_editable(editable_req: str) -> tuple[str | None, str, set[
|
|||||||
|
|
||||||
if url_no_extras.lower().startswith("file:"):
|
if url_no_extras.lower().startswith("file:"):
|
||||||
package_name = Link(url_no_extras).egg_fragment
|
package_name = Link(url_no_extras).egg_fragment
|
||||||
if extras:
|
return (package_name, url_no_extras, extras)
|
||||||
return (
|
|
||||||
package_name,
|
|
||||||
url_no_extras,
|
|
||||||
get_requirement("placeholder" + extras.lower()).extras,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
return package_name, url_no_extras, set()
|
|
||||||
|
|
||||||
for version_control in vcs:
|
for version_control in vcs:
|
||||||
if url.lower().startswith(f"{version_control}:"):
|
if url.lower().startswith(f"{version_control}:"):
|
||||||
@@ -255,7 +240,6 @@ def install_req_from_editable(
|
|||||||
hash_options: dict[str, list[str]] | None = None,
|
hash_options: dict[str, list[str]] | None = None,
|
||||||
constraint: bool = False,
|
constraint: bool = False,
|
||||||
user_supplied: bool = False,
|
user_supplied: bool = False,
|
||||||
permit_editable_wheels: bool = False,
|
|
||||||
config_settings: dict[str, str | list[str]] | None = None,
|
config_settings: dict[str, str | list[str]] | None = None,
|
||||||
) -> InstallRequirement:
|
) -> InstallRequirement:
|
||||||
if constraint:
|
if constraint:
|
||||||
@@ -267,7 +251,6 @@ def install_req_from_editable(
|
|||||||
comes_from=comes_from,
|
comes_from=comes_from,
|
||||||
user_supplied=user_supplied,
|
user_supplied=user_supplied,
|
||||||
editable=True,
|
editable=True,
|
||||||
permit_editable_wheels=permit_editable_wheels,
|
|
||||||
link=parts.link,
|
link=parts.link,
|
||||||
constraint=constraint,
|
constraint=constraint,
|
||||||
isolated=isolated,
|
isolated=isolated,
|
||||||
@@ -341,19 +324,22 @@ def parse_req_from_line(name: str, line_source: str | None) -> RequirementParts:
|
|||||||
if not markers_as_string:
|
if not markers_as_string:
|
||||||
markers = None
|
markers = None
|
||||||
else:
|
else:
|
||||||
markers = Marker(markers_as_string)
|
try:
|
||||||
|
markers = Marker(markers_as_string)
|
||||||
|
except InvalidMarker as exc:
|
||||||
|
raise InstallationError(f"Invalid requirement: {name.strip()!r}: {exc}")
|
||||||
else:
|
else:
|
||||||
markers = None
|
markers = None
|
||||||
name = name.strip()
|
name = name.strip()
|
||||||
req_as_string = None
|
req_as_string = None
|
||||||
path = os.path.normpath(os.path.abspath(name))
|
path = os.path.normpath(os.path.abspath(name))
|
||||||
link = None
|
link = None
|
||||||
extras_as_string = None
|
|
||||||
|
|
||||||
if is_url(name):
|
if is_url(name):
|
||||||
link = Link(name)
|
link = Link(name)
|
||||||
|
extras: set[str] = set()
|
||||||
else:
|
else:
|
||||||
p, extras_as_string = _strip_extras(path)
|
p, extras = strip_extras(path)
|
||||||
url = _get_url_from_path(p, name)
|
url = _get_url_from_path(p, name)
|
||||||
if url is not None:
|
if url is not None:
|
||||||
link = Link(url)
|
link = Link(url)
|
||||||
@@ -376,8 +362,6 @@ def parse_req_from_line(name: str, line_source: str | None) -> RequirementParts:
|
|||||||
else:
|
else:
|
||||||
req_as_string = name
|
req_as_string = name
|
||||||
|
|
||||||
extras = convert_extras(extras_as_string)
|
|
||||||
|
|
||||||
def with_source(text: str) -> str:
|
def with_source(text: str) -> str:
|
||||||
if not line_source:
|
if not line_source:
|
||||||
return text
|
return text
|
||||||
@@ -453,23 +437,6 @@ def install_req_from_req_string(
|
|||||||
except InvalidRequirement as exc:
|
except InvalidRequirement as exc:
|
||||||
raise InstallationError(f"Invalid requirement: {req_string!r}: {exc}")
|
raise InstallationError(f"Invalid requirement: {req_string!r}: {exc}")
|
||||||
|
|
||||||
domains_not_allowed = [
|
|
||||||
PyPI.file_storage_domain,
|
|
||||||
TestPyPI.file_storage_domain,
|
|
||||||
]
|
|
||||||
if (
|
|
||||||
req.url
|
|
||||||
and comes_from
|
|
||||||
and comes_from.link
|
|
||||||
and comes_from.link.netloc in domains_not_allowed
|
|
||||||
):
|
|
||||||
# Explicitly disallow pypi packages that depend on external urls
|
|
||||||
raise InstallationError(
|
|
||||||
"Packages installed from PyPI cannot depend on packages "
|
|
||||||
"which are not also hosted on PyPI.\n"
|
|
||||||
f"{comes_from.name} depends on {req} "
|
|
||||||
)
|
|
||||||
|
|
||||||
return InstallRequirement(
|
return InstallRequirement(
|
||||||
req,
|
req,
|
||||||
comes_from,
|
comes_from,
|
||||||
@@ -546,7 +513,7 @@ def install_req_drop_extras(ireq: InstallRequirement) -> InstallRequirement:
|
|||||||
extras=[],
|
extras=[],
|
||||||
config_settings=ireq.config_settings,
|
config_settings=ireq.config_settings,
|
||||||
user_supplied=ireq.user_supplied,
|
user_supplied=ireq.user_supplied,
|
||||||
permit_editable_wheels=ireq.permit_editable_wheels,
|
source_link=ireq.source_link,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -566,3 +533,95 @@ def install_req_extend_extras(
|
|||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def _pylock_hashes_to_hash_options(hashes: Mapping[str, str]) -> dict[str, list[str]]:
|
||||||
|
return {k: [v] for k, v in hashes.items()}
|
||||||
|
|
||||||
|
|
||||||
|
def install_req_from_pylock_package(
|
||||||
|
package: pylock.Package,
|
||||||
|
package_dist: (
|
||||||
|
pylock.PackageVcs
|
||||||
|
| pylock.PackageArchive
|
||||||
|
| pylock.PackageDirectory
|
||||||
|
| pylock.PackageSdist
|
||||||
|
| pylock.PackageWheel
|
||||||
|
),
|
||||||
|
pylock_path_or_url: str,
|
||||||
|
user_supplied: bool,
|
||||||
|
) -> tuple[InstallRequirement, Link | None]:
|
||||||
|
"""Construct an InstallRequirement from a pylock package and artifact.
|
||||||
|
|
||||||
|
If the artifact is a Sdist or Wheel, also return a locked Link which
|
||||||
|
is meant to override candidates from indexes or --find-links.
|
||||||
|
"""
|
||||||
|
# TODO: validate file size
|
||||||
|
if isinstance(package_dist, pylock.PackageVcs):
|
||||||
|
req_url = package_vcs_requirement_url(pylock_path_or_url, package_dist)
|
||||||
|
return (
|
||||||
|
InstallRequirement(
|
||||||
|
req=Requirement(f"{package.name} @ {req_url}"),
|
||||||
|
comes_from=pylock_path_or_url,
|
||||||
|
user_supplied=user_supplied,
|
||||||
|
),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
elif isinstance(package_dist, pylock.PackageArchive):
|
||||||
|
req_url = package_archive_requirement_url(pylock_path_or_url, package_dist)
|
||||||
|
return (
|
||||||
|
InstallRequirement(
|
||||||
|
req=Requirement(f"{package.name} @ {req_url}"),
|
||||||
|
comes_from=pylock_path_or_url,
|
||||||
|
hash_options=_pylock_hashes_to_hash_options(package_dist.hashes),
|
||||||
|
user_supplied=user_supplied,
|
||||||
|
),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
elif isinstance(package_dist, pylock.PackageDirectory):
|
||||||
|
req_url = package_directory_requirement_url(pylock_path_or_url, package_dist)
|
||||||
|
if package_dist.editable:
|
||||||
|
return (
|
||||||
|
install_req_from_editable(
|
||||||
|
req_url,
|
||||||
|
comes_from=pylock_path_or_url,
|
||||||
|
user_supplied=user_supplied,
|
||||||
|
),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
return (
|
||||||
|
install_req_from_line(
|
||||||
|
req_url,
|
||||||
|
comes_from=pylock_path_or_url,
|
||||||
|
user_supplied=user_supplied,
|
||||||
|
),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
# wheel or sdist
|
||||||
|
version = package.version
|
||||||
|
if isinstance(package_dist, pylock.PackageWheel):
|
||||||
|
if not version:
|
||||||
|
_, version, _, _ = parse_wheel_filename(package_dist.filename)
|
||||||
|
requirement_url = package_wheel_requirement_url(
|
||||||
|
pylock_path_or_url, package_dist
|
||||||
|
)
|
||||||
|
elif isinstance(package_dist, pylock.PackageSdist):
|
||||||
|
if not version:
|
||||||
|
_, version = parse_sdist_filename(package_dist.filename)
|
||||||
|
requirement_url = package_sdist_requirement_url(
|
||||||
|
pylock_path_or_url, package_dist
|
||||||
|
)
|
||||||
|
ireq = InstallRequirement(
|
||||||
|
req=Requirement(f"{package.name}=={version}"),
|
||||||
|
comes_from=pylock_path_or_url,
|
||||||
|
hash_options=_pylock_hashes_to_hash_options(package_dist.hashes),
|
||||||
|
user_supplied=user_supplied,
|
||||||
|
)
|
||||||
|
locked_link = Link(
|
||||||
|
requirement_url,
|
||||||
|
comes_from=pylock_path_or_url,
|
||||||
|
upload_time=package_dist.upload_time,
|
||||||
|
)
|
||||||
|
return ireq, locked_link
|
||||||
@@ -14,7 +14,7 @@ class PEP723Exception(ValueError):
|
|||||||
|
|
||||||
|
|
||||||
def pep723_metadata(scriptfile: str) -> dict[str, Any]:
|
def pep723_metadata(scriptfile: str) -> dict[str, Any]:
|
||||||
with open(scriptfile) as f:
|
with open(scriptfile, encoding="utf8") as f:
|
||||||
script = f.read()
|
script = f.read()
|
||||||
|
|
||||||
name = "script"
|
name = "script"
|
||||||
|
|||||||
Loaded 100 of 764 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user