Showing preview only (1,953K chars total). Download the full file or copy to clipboard to get everything.
Repository: pdm-project/pdm
Branch: main
Commit: d14eebc6ae12
Files: 373
Total size: 1.8 MB
Directory structure:
gitextract_02e0wlec/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ └── feature_request.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── ci.yml
│ ├── claude.yml
│ └── release.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .pre-commit-hooks.yaml
├── .readthedocs.yaml
├── AGENTS.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── README_zh.md
├── SECURITY.md
├── codecov.yml
├── docs/
│ ├── assets/
│ │ ├── extra.css
│ │ └── extra.js
│ ├── dev/
│ │ ├── benchmark.md
│ │ ├── changelog.md
│ │ ├── contributing.md
│ │ ├── fixtures.md
│ │ └── write.md
│ ├── index.md
│ ├── overrides/
│ │ └── main.html
│ ├── reference/
│ │ ├── api.md
│ │ ├── build.md
│ │ ├── cli.md
│ │ ├── configuration.md
│ │ └── pep621.md
│ └── usage/
│ ├── advanced.md
│ ├── config.md
│ ├── dependency.md
│ ├── hooks.md
│ ├── lock-targets.md
│ ├── lockfile.md
│ ├── pep582.md
│ ├── project.md
│ ├── publish.md
│ ├── scripts.md
│ ├── template.md
│ ├── uv.md
│ └── venv.md
├── install-pdm.ps1
├── install-pdm.py
├── install-pdm.py.sha256
├── install-pdm.sh
├── mkdocs.yml
├── news/
│ ├── .gitkeep
│ └── 3541.misc.md
├── pyproject.toml
├── src/
│ └── pdm/
│ ├── __init__.py
│ ├── __main__.py
│ ├── __version__.py
│ ├── _types.py
│ ├── builders/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── editable.py
│ │ ├── sdist.py
│ │ └── wheel.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── actions.py
│ │ ├── commands/
│ │ │ ├── __init__.py
│ │ │ ├── add.py
│ │ │ ├── base.py
│ │ │ ├── build.py
│ │ │ ├── cache.py
│ │ │ ├── completion.py
│ │ │ ├── config.py
│ │ │ ├── export.py
│ │ │ ├── fix/
│ │ │ │ ├── __init__.py
│ │ │ │ └── fixers.py
│ │ │ ├── import_cmd.py
│ │ │ ├── info.py
│ │ │ ├── init.py
│ │ │ ├── install.py
│ │ │ ├── list.py
│ │ │ ├── lock.py
│ │ │ ├── new.py
│ │ │ ├── outdated.py
│ │ │ ├── publish/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── package.py
│ │ │ │ └── repository.py
│ │ │ ├── python.py
│ │ │ ├── remove.py
│ │ │ ├── run.py
│ │ │ ├── search.py
│ │ │ ├── self_cmd.py
│ │ │ ├── show.py
│ │ │ ├── sync.py
│ │ │ ├── update.py
│ │ │ ├── use.py
│ │ │ └── venv/
│ │ │ ├── __init__.py
│ │ │ ├── activate.py
│ │ │ ├── backends.py
│ │ │ ├── create.py
│ │ │ ├── list.py
│ │ │ ├── purge.py
│ │ │ ├── remove.py
│ │ │ └── utils.py
│ │ ├── completions/
│ │ │ ├── __init__.py
│ │ │ ├── pdm.bash
│ │ │ ├── pdm.fish
│ │ │ ├── pdm.ps1
│ │ │ └── pdm.zsh
│ │ ├── filters.py
│ │ ├── hooks.py
│ │ ├── options.py
│ │ ├── templates/
│ │ │ ├── __init__.py
│ │ │ ├── default/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── __init__.py
│ │ │ │ ├── pyproject.toml
│ │ │ │ ├── src/
│ │ │ │ │ └── example_package/
│ │ │ │ │ └── __init__.py
│ │ │ │ └── tests/
│ │ │ │ └── __init__.py
│ │ │ └── minimal/
│ │ │ ├── .gitignore
│ │ │ ├── __init__.py
│ │ │ └── pyproject.toml
│ │ └── utils.py
│ ├── compat.py
│ ├── core.py
│ ├── environments/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── local.py
│ │ └── python.py
│ ├── exceptions.py
│ ├── formats/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── flit.py
│ │ ├── pipfile.py
│ │ ├── poetry.py
│ │ ├── pylock.py
│ │ ├── requirements.py
│ │ ├── setup_py.py
│ │ └── uv.py
│ ├── installers/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── core.py
│ │ ├── installers.py
│ │ ├── manager.py
│ │ ├── synchronizers.py
│ │ ├── uninstallers.py
│ │ └── uv.py
│ ├── misc/
│ │ ├── __init__.py
│ │ └── sysconfig_patcher.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── auth.py
│ │ ├── backends.py
│ │ ├── cached_package.py
│ │ ├── caches.py
│ │ ├── candidates.py
│ │ ├── finder.py
│ │ ├── in_process/
│ │ │ ├── __init__.py
│ │ │ ├── env_spec.py
│ │ │ ├── parse_setup.py
│ │ │ └── sysconfig_get_paths.py
│ │ ├── markers.py
│ │ ├── project_info.py
│ │ ├── python.py
│ │ ├── python_max_versions.json
│ │ ├── reporter.py
│ │ ├── repositories/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── lock.py
│ │ │ └── pypi.py
│ │ ├── requirements.py
│ │ ├── search.py
│ │ ├── session.py
│ │ ├── setup.py
│ │ ├── specifiers.py
│ │ ├── venv.py
│ │ ├── versions.py
│ │ └── working_set.py
│ ├── pep582/
│ │ ├── __init__.py
│ │ └── sitecustomize.py
│ ├── project/
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── core.py
│ │ ├── lockfile/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── pdmlock.py
│ │ │ └── pylock.py
│ │ ├── project_file.py
│ │ └── toml_file.py
│ ├── py.typed
│ ├── pytest.py
│ ├── resolver/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── graph.py
│ │ ├── providers.py
│ │ ├── python.py
│ │ ├── reporters.py
│ │ ├── resolvelib.py
│ │ └── uv.py
│ ├── signals.py
│ ├── termui.py
│ └── utils.py
├── tasks/
│ ├── complete.py
│ ├── max_versions.py
│ └── release.py
├── tests/
│ ├── __init__.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_add.py
│ │ ├── test_build.py
│ │ ├── test_cache.py
│ │ ├── test_completion.py
│ │ ├── test_config.py
│ │ ├── test_fix.py
│ │ ├── test_hooks.py
│ │ ├── test_info.py
│ │ ├── test_init.py
│ │ ├── test_install.py
│ │ ├── test_list.py
│ │ ├── test_lock.py
│ │ ├── test_others.py
│ │ ├── test_outdated.py
│ │ ├── test_publish.py
│ │ ├── test_python.py
│ │ ├── test_remove.py
│ │ ├── test_run.py
│ │ ├── test_search.py
│ │ ├── test_self_command.py
│ │ ├── test_show.py
│ │ ├── test_template.py
│ │ ├── test_update.py
│ │ ├── test_use.py
│ │ ├── test_utils.py
│ │ └── test_venv.py
│ ├── conftest.py
│ ├── environments/
│ │ ├── test_environment.py
│ │ └── test_shebangs.py
│ ├── fixtures/
│ │ ├── Pipfile
│ │ ├── __init__.py
│ │ ├── artifacts/
│ │ │ ├── PyFunctional-1.4.3-py3-none-any.whl
│ │ │ ├── celery-4.4.2-py2.py3-none-any.whl
│ │ │ ├── demo-0.0.1-cp36-cp36m-win_amd64.whl
│ │ │ ├── demo-0.0.1-py2.py3-none-any.whl
│ │ │ ├── editables-0.2-py3-none-any.whl
│ │ │ ├── first-2.0.2-py2.py3-none-any.whl
│ │ │ ├── flit_core-3.6.0-py3-none-any.whl
│ │ │ ├── future_fstrings-1.2.0-py2.py3-none-any.whl
│ │ │ ├── importlib_metadata-4.8.3-py3-none-any.whl
│ │ │ ├── jmespath-0.10.0-py2.py3-none-any.whl
│ │ │ ├── pdm_backend-2.1.4-py3-none-any.whl
│ │ │ ├── pdm_hello-0.1.0-py3-none-any.whl
│ │ │ ├── pdm_hello-0.1.0-py3-none-win_amd64.whl
│ │ │ ├── pdm_pep517-1.0.0-py3-none-any.whl
│ │ │ ├── poetry_core-1.3.2-py3-none-any.whl
│ │ │ ├── setuptools-68.0.0-py3-none-any.whl
│ │ │ ├── typing_extensions-4.4.0-py3-none-any.whl
│ │ │ ├── wheel-0.37.1-py2.py3-none-any.whl
│ │ │ ├── zipp-3.6.0-py3-none-any.whl
│ │ │ └── zipp-3.7.0-py3-none-any.whl
│ │ ├── constraints.txt
│ │ ├── index/
│ │ │ ├── demo.html
│ │ │ ├── future-fstrings.html
│ │ │ ├── pep345-legacy.html
│ │ │ └── wheel.html
│ │ ├── json/
│ │ │ └── zipp.json
│ │ ├── poetry-error.toml
│ │ ├── poetry-new.toml
│ │ ├── projects/
│ │ │ ├── __init__.py
│ │ │ ├── demo/
│ │ │ │ ├── demo.py
│ │ │ │ ├── pylock.toml
│ │ │ │ └── pyproject.toml
│ │ │ ├── demo-#-with-hash/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── demo-combined-extras/
│ │ │ │ ├── demo.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── demo-failure/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── demo-failure-no-dep/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── demo-module/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── bar_module.py
│ │ │ │ ├── foo_module.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── demo-package/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── data_out.json
│ │ │ │ ├── my_package/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── data.json
│ │ │ │ ├── pyproject.toml
│ │ │ │ ├── requirements.ini
│ │ │ │ ├── requirements.txt
│ │ │ │ ├── requirements_simple.txt
│ │ │ │ ├── setup.txt
│ │ │ │ └── single_module.py
│ │ │ ├── demo-package-has-dep-with-extras/
│ │ │ │ ├── pyproject.toml
│ │ │ │ └── requirements.txt
│ │ │ ├── demo-parent-package/
│ │ │ │ ├── README.md
│ │ │ │ ├── package-a/
│ │ │ │ │ ├── foo.py
│ │ │ │ │ └── setup.py
│ │ │ │ └── package-b/
│ │ │ │ ├── bar.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── demo-prerelease/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── demo-src-package/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── data_out.json
│ │ │ │ ├── pyproject.toml
│ │ │ │ ├── single_module.py
│ │ │ │ └── src/
│ │ │ │ └── my_package/
│ │ │ │ ├── __init__.py
│ │ │ │ └── data.json
│ │ │ ├── demo_extras/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── flit-demo/
│ │ │ │ ├── README.rst
│ │ │ │ ├── doc/
│ │ │ │ │ └── index.html
│ │ │ │ ├── flit.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── poetry-demo/
│ │ │ │ ├── mylib.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── poetry-with-circular-dep/
│ │ │ │ ├── packages/
│ │ │ │ │ └── child/
│ │ │ │ │ ├── child/
│ │ │ │ │ │ └── __init__.py
│ │ │ │ │ └── pyproject.toml
│ │ │ │ ├── parent/
│ │ │ │ │ └── __init__.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── test-hatch-static/
│ │ │ │ ├── README.md
│ │ │ │ └── pyproject.toml
│ │ │ ├── test-monorepo/
│ │ │ │ ├── README.md
│ │ │ │ ├── core/
│ │ │ │ │ ├── core.py
│ │ │ │ │ └── pyproject.toml
│ │ │ │ ├── package_a/
│ │ │ │ │ ├── alice.py
│ │ │ │ │ └── pyproject.toml
│ │ │ │ ├── package_b/
│ │ │ │ │ ├── bob.py
│ │ │ │ │ └── pyproject.toml
│ │ │ │ └── pyproject.toml
│ │ │ ├── test-package-type-fixer/
│ │ │ │ ├── pyproject.toml
│ │ │ │ └── src/
│ │ │ │ └── test_package_type_fixer/
│ │ │ │ └── __init__.py
│ │ │ ├── test-plugin/
│ │ │ │ ├── hello.py
│ │ │ │ └── setup.py
│ │ │ ├── test-plugin-pdm/
│ │ │ │ ├── hello.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── test-removal/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bar.py
│ │ │ │ ├── foo.py
│ │ │ │ └── subdir/
│ │ │ │ └── __init__.py
│ │ │ └── test-setuptools/
│ │ │ ├── AUTHORS
│ │ │ ├── README.md
│ │ │ ├── mymodule.py
│ │ │ ├── setup.cfg
│ │ │ └── setup.py
│ │ ├── pypi.json
│ │ ├── pyproject.toml
│ │ ├── requirements-include.txt
│ │ └── requirements.txt
│ ├── models/
│ │ ├── __init__.py
│ │ ├── test_backends.py
│ │ ├── test_candidates.py
│ │ ├── test_marker.py
│ │ ├── test_requirements.py
│ │ ├── test_session.py
│ │ ├── test_setup_parsing.py
│ │ ├── test_setup_parsing_extra.py
│ │ ├── test_specifiers.py
│ │ └── test_versions.py
│ ├── resolver/
│ │ ├── __init__.py
│ │ ├── test_graph.py
│ │ ├── test_resolve.py
│ │ └── test_uv_resolver.py
│ ├── test_formats.py
│ ├── test_installer.py
│ ├── test_integration.py
│ ├── test_plugin.py
│ ├── test_project.py
│ ├── test_signals.py
│ └── test_utils.py
├── tox.ini
└── typings/
└── shellingham.pyi
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: "Bug report"
description: Create a report to help us improve
labels: ['🐛 bug']
body:
- type: markdown
attributes:
value: "Thank you for taking the time to report a bug. Please provide as much information as possible to help us understand and resolve the issue."
- type: textarea
id: describe-bug
attributes:
label: Describe the bug
description: "A clear and concise description of what the bug is."
placeholder: "Describe the bug..."
validations:
required: true
- type: textarea
id: reproduce-bug
attributes:
label: To reproduce
description: "Steps to reproduce the behavior."
placeholder: "Steps to reproduce the behavior..."
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: "A clear and concise description of what you expected to happen."
placeholder: "Explain what you expected to happen..."
validations:
required: true
- type: textarea
id: "environment-info"
attributes:
label: Environment Information
description: "Paste the output of `pdm info && pdm info --env`"
placeholder: "Paste the output of `pdm info && pdm info --env`"
validations:
required: true
- type: textarea
id: "pdm-debug-output"
attributes:
label: "Verbose Command Output"
description: "Please provide the command output with `-v`."
placeholder: "Add the command output with `-v`..."
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Add any other context about the problem here."
placeholder: "Additional details..."
validations:
required: false
- type: checkboxes
id: willing-to-submit-pr
attributes:
label: "Are you willing to submit a PR to fix this bug?"
description: "Let us know if you are willing to contribute a fix by submitting a Pull Request."
options:
- label: "Yes, I would like to submit a PR."
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: "Feature / Enhancement Proposal"
description: Suggest an idea for this project
labels: ['⭐ enhancement']
body:
- type: markdown
attributes:
value: "Thank you for suggesting a new feature. Please fill out the details below to help us understand your idea better."
- type: textarea
id: feature-description
attributes:
label: Feature Description
description: "A detailed description of the feature you would like to see."
placeholder: "Describe the feature you'd like..."
validations:
required: true
- type: textarea
id: problem-solution
attributes:
label: Problem and Solution
description: "Describe the problem that this feature would solve. Explain how you envision it working."
placeholder: "What problem does this feature solve? How do you envision it working?"
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Add any other context or screenshots about the feature request here."
placeholder: "Add any other context or screenshots about the feature request here."
validations:
required: false
- type: checkboxes
id: willing-to-contribute
attributes:
label: "Are you willing to contribute to the development of this feature?"
description: "Let us know if you are willing to help by contributing code or other resources."
options:
- label: "Yes, I am willing to contribute to the development of this feature."
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
## Pull Request Checklist
- [ ] A news fragment is added in `news/` describing what is new.
- [ ] Test cases added for changed code.
## Describe what you have changed in this PR.
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
# Maintain dependencies for workflow actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
labels:
- "github_actions"
groups:
actions:
patterns:
- "*"
================================================
FILE: .github/workflows/ci.yml
================================================
name: Tests
on:
pull_request:
branches:
- main
- dev
- "maintain/*"
paths-ignore:
- "docs/**"
- "news/**"
- "*.md"
push:
branches:
- main
- dev
- "maintain/*"
paths-ignore:
- "docs/**"
- "news/**"
- "*.md"
concurrency:
group: ${{ github.event.number || github.run_id }}
cancel-in-progress: true
jobs:
Testing:
env:
PYTHONDEVMODE: 1
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.9, "3.10", 3.11, 3.12, 3.13, 3.14]
os: [ubuntu-latest, windows-latest, macos-latest]
install-via: [pip]
include:
- python-version: 3.12
os: ubuntu-latest
install-via: script
- python-version: pypy-3.11
os: ubuntu-latest
install-via: pip
steps:
- uses: actions/checkout@v6.0.2
- name: Setup Python Versions
uses: actions/setup-python@v6
with:
python-version: |
3.9
3.10
3.11
3.12
3.13
3.14
allow-prereleases: true
if: matrix.os != 'macos-latest'
- name: Setup Python Versions
uses: actions/setup-python@v6
with:
python-version: |
3.10
3.11
3.12
3.13
3.14
allow-prereleases: true
if: matrix.os == 'macos-latest'
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
allow-prereleases: true
- name: Cache venv
uses: actions/cache@v5.0.3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pdm.lock') }}
- name: Install uv
uses: astral-sh/setup-uv@v7.3.1
with:
version: "latest"
- name: Install current PDM via pip
if: matrix.install-via == 'pip'
run: python -m pip install -U .
- name: Install current PDM via script
if: matrix.install-via == 'script'
run: |
shasum -a256 --check install-pdm.py.sha256
python install-pdm.py --version head
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Dev Dependencies
run: |
pdm install -v -Gtest
pdm run pip install -U setuptools
pdm info
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3.22
- name: Run Tests
run: pdm run pytest -n auto --cov=pdm --cov-config=pyproject.toml --cov-report=xml tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
Pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Install PDM
run: |
python -m pip install .
pdm self add pdm-packer
- name: Pack pdm
run: pdm pack
- name: Test zipapp
run: python pdm.pyz --version
================================================
FILE: .github/workflows/claude.yml
================================================
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.2
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1.0.64
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514"
# Optional: Customize the trigger phrase (default: @claude)
# trigger_phrase: "/claude"
# Optional: Trigger when specific user is assigned to an issue
# assignee_trigger: "claude-bot"
# Optional: Allow Claude to run specific commands
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
# Optional: Add custom instructions for Claude to customize its behavior for your project
# custom_instructions: |
# Follow our coding standards
# Ensure all new code has tests
# Use TypeScript for new files
# Optional: Custom environment variables for Claude
# claude_env: |
# NODE_ENV: test
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
push:
tags:
- "*"
defaults:
run:
# make sure to work on Windows
shell: bash
jobs:
release-pypi:
name: release-pypi
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
- name: Check prerelease
id: check_version
run: |
if [[ "${{ github.ref }}" =~ ^refs/tags/[0-9.]+$ ]]; then
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
else
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
fi
- name: Build artifacts
run: |
pipx run build
- name: Upload artifacts
uses: actions/upload-artifact@v7.0.0
with:
name: pdm-wheel
path: dist/*.whl
if-no-files-found: error
retention-days: 15
- name: Test Build
run: |
python -m pip install "pdm[locked] @ file://$(ls ${GITHUB_WORKSPACE}/dist/*.whl)"
pdm --help
- name: Publish package distributions to PyPI
run: pdm publish --no-build
- name: Get Changelog
id: get-changelog
run: |
awk '/## Release/{if (flag==1)exit;else;flag=1;next} flag' CHANGELOG.md > .changelog.md
- name: Create Release
uses: actions/create-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ github.ref }}
body_path: .changelog.md
draft: false
prerelease: ${{ steps.check_version.outputs.PRERELEASE }}
- name: Trigger Bucket Update
uses: benc-uk/workflow-dispatch@v1.3.1
with:
workflow: Excavator
repo: frostming/scoop-frostming
token: ${{ secrets.G_T }}
ref: master
binary:
needs: release-pypi
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
[
"ubuntu-24.04",
"ubuntu-24.04-arm",
"windows-2025",
"macos-15-intel",
"macos-15",
]
env:
PYAPP_REPO: pyapp
PYAPP_VERSION: "0.27.0"
PYAPP_PROJECT_NAME: pdm
PYAPP_PROJECT_VERSION: ${{ github.ref_name }}
PYAPP_SELF_COMMAND: app # since `self` has been taken in `pdm`
PYAPP_DISTRIBUTION_EMBED: true
PYAPP_PROJECT_FEATURES: locked
SOURCE_FILE: ${{ matrix.os != 'windows-2025' && 'pyapp' || 'pyapp.exe' }}
TARGET_FILE: ${{ matrix.os != 'windows-2025' && 'pdm' || 'pdm.exe' }}
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Fetch PyApp
run: >-
mkdir $PYAPP_REPO && curl -L
https://github.com/ofek/pyapp/releases/download/v$PYAPP_VERSION/source.tar.gz
|
tar --strip-components=1 -xzf - -C $PYAPP_REPO
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
if: matrix.os != 'macos-15-intel'
- name: Set sccache env
if: matrix.os != 'macos-15-intel'
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
- name: Download artifacts
uses: actions/download-artifact@v8.0.0
with:
name: pdm-wheel
path: dist
- name: Configure embedded wheel
run: |
cd dist
wheel="$(echo *.whl)"
mv $wheel ../$PYAPP_REPO
echo "PYAPP_PROJECT_PATH=$wheel" >> $GITHUB_ENV
echo "TARGET_TRIPLE=$(rustc --version --verbose | grep "host" | awk '{print $2}')" >> $GITHUB_ENV
- name: Build
run: |
cd $PYAPP_REPO
cargo build --release
mv target/release/$SOURCE_FILE ../$TARGET_FILE
- name: Upload Assets
uses: actions/upload-artifact@v7.0.0
with:
name: pdm-${{ github.ref_name }}-${{ env.TARGET_TRIPLE }}
path: ${{ env.TARGET_FILE }}
if-no-files-found: error
retention-days: 15
- name: Create and Upload Archive with Checksum
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_FILE: pdm-${{ github.ref_name }}-${{ env.TARGET_TRIPLE }}.tar.gz
CHECKSUM_FILE: pdm-${{ github.ref_name }}-${{ env.TARGET_TRIPLE }}.tar.gz.sha256
run: |
tar -czf $UPLOAD_FILE $TARGET_FILE
if command -v sha256sum &> /dev/null; then
sha256sum $UPLOAD_FILE > $CHECKSUM_FILE
else
shasum -a 256 $UPLOAD_FILE > $CHECKSUM_FILE
fi
gh release upload ${{ github.ref_name }} $UPLOAD_FILE $CHECKSUM_FILE --clobber
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
docs/site
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
/venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
.vscode/
caches/
.idea/
__pypackages__
.pdm.toml
.pdm-python
temp.py
# Pyannotate generated stubs
type_info.json
.pdm-build/
src/pdm/VERSION
.zed/
================================================
FILE: .pre-commit-config.yaml
================================================
ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.15.4'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell # See pyproject.toml for args
additional_dependencies:
- tomli
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
args: [src]
pass_filenames: false
additional_dependencies:
- types-requests
- types-certifi
- pytest
================================================
FILE: .pre-commit-hooks.yaml
================================================
- id: pdm-lock-check
name: pdm-lock-check
description: run pdm lock --check to validate config
entry: pdm lock --check
language: python
language_version: python3
pass_filenames: false
files: ^pyproject.toml$
- id: pdm-export
name: pdm-export-lock
description: export locked packages to requirements.txt or setup.py
entry: pdm export
language: python
language_version: python3
pass_filenames: false
files: ^pdm.lock$
- id: pdm-sync
name: pdm-sync
description: sync current working set with pdm.lock
entry: pdm sync
language: python
language_version: python3
pass_filenames: false
stages:
- post-checkout
- post-merge
- post-rewrite
always_run: true
================================================
FILE: .readthedocs.yaml
================================================
# Read the Docs configuration file for MkDocs projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
jobs:
post_create_environment:
- python install-pdm.py --path ~/.local/pdm
- ~/.local/pdm/bin/pdm --version
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH ~/.local/pdm/bin/pdm install -dG doc
mkdocs:
configuration: mkdocs.yml
================================================
FILE: AGENTS.md
================================================
# AGENTS.md
This file provides guidance to AI coding assistants when working with code in this repository.
## Project Overview
PDM (Python Dependency Manager) is a modern Python package and dependency manager that supports the latest PEP standards (PEP 517, PEP 621). It provides fast dependency resolution, flexible plugin system, and centralized cache management similar to pnpm.
## Core Architecture
### Key Components
1. **Project Management** (`src/pdm/project/`): Handles pyproject.toml parsing, project configuration, and metadata management
2. **Dependency Resolution** (`src/pdm/resolver/`): Fast dependency resolver using resolvelib with custom optimizations for binary distributions
3. **Environment Management** (`src/pdm/environments/`): Manages Python environments (virtualenv, PEP 582, system)
4. **Installer System** (`src/pdm/installers/`): Installs and uninstalls packages into the site-packages directory with centralized cache support
5. **CLI System** (`src/pdm/cli/commands/`): Command-line interface using argparse with plugin support
6. **Repository Models** (`src/pdm/models/repositories/`): PyPI repository interaction and package finder
7. **Build System** (`src/pdm/builders/`): PEP 517 build front-end for creating wheels and sdists
### Command Entry Points
All CLI commands are in `src/pdm/cli/commands/` with command registration in `src/pdm/core.py`. Commands inherit from `BaseCommand` and use decorator patterns for common options.
## Development Commands
### Setup Development Environment
```bash
# Install development dependencies
pdm install
```
### Run Tests
```bash
# Run all tests
pdm run test
# Run tests in parallel
pdm run test -n auto
```
Most of the time, you can exclude tests with "integration" mark to save runtime:
```bash
pdm run test -n auto -m "not integration"
```
### Code Quality
```bash
# Run linting (ruff-format + codespell + mypy)
pdm run lint
```
### Documentation
```bash
# Serve documentation locally
pdm run doc
```
### Contribution Guidelines
Refer to [CONTRIBUTING.md](CONTRIBUTING.md)
## Important Files
- `pyproject.toml`: Project configuration and dependencies
- `src/pdm/core.py`: Main application entry point and command registration
- `src/pdm/project/__init__.py`: Project class managing project state
- `src/pdm/cli/commands/base.py`: Base command class for all CLI commands
- `.pre-commit-config.yaml`: Code quality hooks (ruff, mypy, codespell)
## Common Development Tasks
### Adding a New Command
1. Create new file in `src/pdm/cli/commands/`
2. Inherit from `BaseCommand`
3. Register in `src/pdm/core.py`
### Debugging Resolution Issues
- Set `PDM_DEBUG=1` environment variable for verbose output
- Check `pdm.lock` for resolved versions
- Use `pdm lock --check` to verify lock file
### Working with Lock Files
PDM uses its own lock file format (`pdm.lock`) that includes:
- Exact versions with hashes
- Environment markers
- Cross-platform support
- Group dependencies
### Update dependencies
```bash
# Add a new dependency to default group
pdm add <package_name>
# Update all dependencies
pdm update
# Remove a dependency
pdm remove <package_name>
# Add a new dependency to given group
pdm add <package_name> --group <group_name>
```
## Architecture Patterns
- **Dependency Injection**: Core class passed to commands
- **Signal System**: Event-driven architecture for plugins
- **Repository Pattern**: Abstract repository interface for package sources
- **Strategy Pattern**: Different environment backends (venv, conda, etc.)
- **Chain of Responsibility**: Middleware system for HTTP client
================================================
FILE: CHANGELOG.md
================================================
## Release v2.26.6 (2026-01-22)
### Bug Fixes
- Support `packaging==26.0` changes for version comparison ([#3729](https://github.com/pdm-project/pdm/issues/3729))
## Release v2.26.5 (2026-01-21)
### Bug Fixes
- Respect the project path when using cookiecutter template in `pdm init` command. ([#3721](https://github.com/pdm-project/pdm/issues/3721))
- Fix a bug that `resolution.excludes` is not applied when evaluating candidates from the lock file. ([#3726](https://github.com/pdm-project/pdm/issues/3726))
### Documentation
- Remove chatbot from the docs page footer. ([#3722](https://github.com/pdm-project/pdm/issues/3722))
- Generate llms.txt for docs powered by `mkdocs-llmstxt`. ([#3723](https://github.com/pdm-project/pdm/issues/3723))
## Release v2.26.4 (2026-01-09)
### Bug Fixes
- Make sure cursor closing for fixing PyPy different gc mode also add PyPy in CI. ([#3708](https://github.com/pdm-project/pdm/issues/3708))
- Fix a bug that old HTTP cache directories cause PDM to crash when trying to clear them. ([#3715](https://github.com/pdm-project/pdm/issues/3715))
## Release v2.26.3 (2025-12-24)
### Features & Improvements
- Port to `hishel` 1.0.0. ([#3700](https://github.com/pdm-project/pdm/issues/3700))
### Bug Fixes
- Update `.gitignore` file in the default template. ([#3686](https://github.com/pdm-project/pdm/issues/3686))
- Correct the sysconfig variables for Python standalone build installations. ([#3693](https://github.com/pdm-project/pdm/issues/3693))
- Ignore `packages.vcs.requested-revision` if it's None when formatting pylock.toml. ([#3694](https://github.com/pdm-project/pdm/issues/3694))
- Fix test failures with uv test cases using non-venv Python interpreters. ([#3698](https://github.com/pdm-project/pdm/issues/3698))
## Release v2.26.2 (2025-11-24)
### Features & Improvements
- Only parse TOML document with `tomlkit` when writing is required. ([#3672](https://github.com/pdm-project/pdm/issues/3672))
- Add SHA256 checksums for binary releases during the release workflow and create an installer script that downloads binaries from GitHub releases with automatic platform detection and checksum verification. ([#3679](https://github.com/pdm-project/pdm/issues/3679))
### Bug Fixes
- Fix test_use_python_write_file_multiple_versions to match PDM's actual behavior. ([#3660](https://github.com/pdm-project/pdm/issues/3660))
- Correctly calculate the venv path for `UV_PROJECT_ENVIRONMENT` env var when using uv mode. ([#3675](https://github.com/pdm-project/pdm/issues/3675))
- Ensure `implementation.gil_disabled` is a boolean in `get_current_env_spec`. This fix an issue that free-threaded wheels get rejected incorrectly. ([#3677](https://github.com/pdm-project/pdm/issues/3677))
- Fix CLI help formatting on Python 3.14+. ([#3683](https://github.com/pdm-project/pdm/issues/3683))
- Make `PdmBasicAuth` a `cached_property` to accelerate execution. ([#3684](https://github.com/pdm-project/pdm/issues/3684))
### Removals and Deprecations
- Add deprecation warning for `pdm search` command as PyPI no longer supports search API. ([#3674](https://github.com/pdm-project/pdm/issues/3674))
### Miscellany
- Add tests to utils.fs_supports_link_method and utils.convert_to_datetime. ([#3541](https://github.com/pdm-project/pdm/issues/3541))
## Release v2.26.1 (2025-10-29)
### Bug Fixes
- Substitute missing env vars with empty string in `expand_env_vars`. ([#3653](https://github.com/pdm-project/pdm/issues/3653))
- Constrained hishel to be less than 1.0.0 due to its refactor ([#3657](https://github.com/pdm-project/pdm/issues/3657))
## Release v2.26.0 (2025-10-11)
### Features & Improvements
- Limit the log file size to 100MB and truncate the log output if exceeded. ([#3633](https://github.com/pdm-project/pdm/issues/3633))
- Speed up dependency resolution in the bad path by skipping candidates of the same version when resolving. ([#3647](https://github.com/pdm-project/pdm/issues/3647))
### Bug Fixes
- Reload project files after running hook scripts. ([#3615](https://github.com/pdm-project/pdm/issues/3615))
- Fix a bug when using UV as the resolver does not respect the venv.location configuration. ([#3616](https://github.com/pdm-project/pdm/issues/3616))
- Fix `publish --skip-existing` for Nexus Repository OSS >= 3.70 ([#3617](https://github.com/pdm-project/pdm/issues/3617))
- Fix a resolution failure when both prerelease and non-prerelease requirements exist. ([#3634](https://github.com/pdm-project/pdm/issues/3634))
- Ignore invalid `python` requirement during locking. ([#3635](https://github.com/pdm-project/pdm/issues/3635))
- Isolate PDM loggers with the root logger to avoid log leakage. ([#3637](https://github.com/pdm-project/pdm/issues/3637))
- Fix a crash when resolving URL dependencies under `use_uv=true`. ([#3640](https://github.com/pdm-project/pdm/issues/3640))
## Release v2.25.9 (2025-08-22)
No significant changes.
## Release v2.25.8 (2025-08-22)
### Bug Fixes
- Fix a careless error by fast apply in AI coding. ([#3612](https://github.com/pdm-project/pdm/issues/3612))
## Release v2.25.7 (2025-08-22)
### Features & Improvements
- Show the path to site-packages in the output of `pdm info`. ([#3600](https://github.com/pdm-project/pdm/issues/3600))
### Bug Fixes
- Fix `uv python dir` path resolution on Windows ([#3603](https://github.com/pdm-project/pdm/issues/3603))
- Strip local version in version specifiers when writing package locks. ([#3605](https://github.com/pdm-project/pdm/issues/3605))
- Show an error message when 'default' is used in optional dependencies or dependency groups. ([#3609](https://github.com/pdm-project/pdm/issues/3609))
- Prevent hash clearing when appending to lockfile with env_spec. ([#3610](https://github.com/pdm-project/pdm/issues/3610))
## Release v2.25.6 (2025-08-14)
### Features & Improvements
- The `pdm python install -v` command now shows the download URL for the Python interpreter. ([#3552](https://github.com/pdm-project/pdm/issues/3552))
### Bug Fixes
- Ensure `make_array` always returns a tomlkit array type. ([#3586](https://github.com/pdm-project/pdm/issues/3586))
- Preserve multi-line help text in the CLI help output. ([#3587](https://github.com/pdm-project/pdm/issues/3587))
- Re-caculate artifact files and hashes when the lock target changes. ([#3595](https://github.com/pdm-project/pdm/issues/3595))
### Dependencies
- Require packaging>22.0 and remove conditional PACKAGING_22 version checks. ([#3601](https://github.com/pdm-project/pdm/issues/3601))
- Bump truststore to version 0.10.4. ([#3602](https://github.com/pdm-project/pdm/issues/3602))
## Release v2.25.5 (2025-07-30)
### Features & Improvements
- Tell the difference between free-threaded Python and normal ones. Users need to request for free-threaded versions explicitly by adding `t` to the version string, otherwise the normal build will be preferred. ([#3562](https://github.com/pdm-project/pdm/issues/3562))
### Bug Fixes
- Fix a bug that editable local package URLs are empty when using `pylock.toml`. ([#3565](https://github.com/pdm-project/pdm/issues/3565))
- Fix a bug where `pdm export` with `--lockfile pylock.toml` produced empty requirements.txt files due to missing group information extraction from pylock format markers. ([#3573](https://github.com/pdm-project/pdm/issues/3573))
- Read metadata from installed distribution when using reuse-installed strategy. ([#3579](https://github.com/pdm-project/pdm/issues/3579))
- Fix a lockfile writing error when locking git dependencies in the pylock.toml format. ([#3582](https://github.com/pdm-project/pdm/issues/3582))
## Release v2.25.4 (2025-06-30)
### Bug Fixes
- Add credentials when passing source urls to uv resolver. ([#3553](https://github.com/pdm-project/pdm/issues/3553))
- Redact credentials in source urls in the log output, and inject credentials into the source url for uv sync command as well. ([#3555](https://github.com/pdm-project/pdm/issues/3555))
- Fix a bug that extra dependencies of transitive dependencies are not properly installed when USE_UV=true ([#3558](https://github.com/pdm-project/pdm/issues/3558))
- Improve the terminal output when setting up a script environment. ([#3560](https://github.com/pdm-project/pdm/issues/3560))
- Skip non-existent library paths in post-install steps when trying to fix the pth files. ([#3561](https://github.com/pdm-project/pdm/issues/3561))
### Dependencies
- Update `resolvelib` to 1.2.0. ([#3557](https://github.com/pdm-project/pdm/issues/3557))
## Release v2.25.3 (2025-06-22)
### Bug Fixes
- Fix a bug that local file package metadata was missing when reading the lockfile. ([#3545](https://github.com/pdm-project/pdm/issues/3545))
- Extract `dependency-groups` and `extras` markers from `marker` value when parsing pylock.toml. ([#3550](https://github.com/pdm-project/pdm/issues/3550))
## Release v2.25.2 (2025-06-16)
No significant changes.
## Release v2.25.1 (2025-06-14)
### Bug Fixes
- Fix duplicated dependencies added to the lock file when the same dependency with extras is requested. ([#3542](https://github.com/pdm-project/pdm/issues/3542))
- Stabilize order of the `extras` and `dependency-groups` fields in pylock output. ([#3543](https://github.com/pdm-project/pdm/issues/3543))
## Release v2.25.0 (2025-06-13)
### Features & Improvements
- Support pylock as alternative lock format and make it opt-in by config. ([#3481](https://github.com/pdm-project/pdm/issues/3481))
- Search for package metadata in lock file first when reuse strategy is used. ([#3522](https://github.com/pdm-project/pdm/issues/3522))
### Bug Fixes
- Fix Windows 11 install pdm error, which is because of msgpack install failure. ([#3485](https://github.com/pdm-project/pdm/issues/3485))
- Change the return type of `array_of_inline_tables` to list[dict] from list[str] ([#3523](https://github.com/pdm-project/pdm/issues/3523))
- Ensure uv resolver to include hash for package files. ([#3531](https://github.com/pdm-project/pdm/issues/3531))
- Avoid infinite recursion when reading pyproject.toml with circular file dependencies. ([#3539](https://github.com/pdm-project/pdm/issues/3539))
## Release v2.24.2 (2025-05-23)
### Bug Fixes
- Reinstalling local wheel if its checksum changes. ([#3503](https://github.com/pdm-project/pdm/issues/3503))
- Ignore HTTP cache entries if deserialization fails. ([#3515](https://github.com/pdm-project/pdm/issues/3515))
- Fetch missing URLs when `static_urls` is not enabled when running `pdm export -f pylock`. ([#3517](https://github.com/pdm-project/pdm/issues/3517))
- Missing self package when `--self` or `--editable-self` is passed to `pdm export -f pylock`. ([#3518](https://github.com/pdm-project/pdm/issues/3518))
### Miscellany
- Add Python 3.14 to the test matrix. ([#3506](https://github.com/pdm-project/pdm/issues/3506))
## Release v2.24.1 (2025-04-23)
### Bug Fixes
- Install the project when using the `BaseSynchronizer` with `install_self` set
to `True`. This fixes the bug that when calling `pdm sync --quiet`, it skips
installing the project itself. ([#3484](https://github.com/pdm-project/pdm/issues/3484))
- Mark one additional test as requiring network, and fix another one
not to require it anymore. ([#3487](https://github.com/pdm-project/pdm/issues/3487))
## Release v2.24.0 (2025-04-18)
### Features & Improvements
- New command `pdm new` that behaves like `pdm init` but creates a new project. ([#3462](https://github.com/pdm-project/pdm/issues/3462))
- Support use `--name` as project name for command `pdm new` e.g. `pdm new hello --name world` ([#3476](https://github.com/pdm-project/pdm/issues/3476))
- Support exporting to pylock.toml format as described by PEP 751. ([#3480](https://github.com/pdm-project/pdm/issues/3480))
### Bug Fixes
- Pass the `--quiet` option to `pdm sync` command. ([#3401](https://github.com/pdm-project/pdm/issues/3401))
- If a `.python-version` file is found and it contains multiple lines, the file will be ignored. The usage of the `.python-version` file can be disabled, if configuration value `python.use_python_version` (or environment variable `PDM_USE_PYTHON_VERSION`) is `False`. ([#3417](https://github.com/pdm-project/pdm/issues/3417))
- fix `pdm config -e` command to open read-only file under linux ([#3423](https://github.com/pdm-project/pdm/issues/3423))
- Replace project names and import names in both `README.md` and `pyproject.toml` when running `pdm init <template>`. ([#3460](https://github.com/pdm-project/pdm/issues/3460))
- Fix a bug that URL dependency hashes are not updated if running `pdm lock --update-reuse`. ([#3461](https://github.com/pdm-project/pdm/issues/3461))
## Release v2.23.1 (2025-04-09)
### Features & Improvements
- Use `pyapp` to wrap `pdm` as a Python application that bootstrap itself at runtime. ([#3429](https://github.com/pdm-project/pdm/issues/3429))
- Support all providers `id` is supporting currently for OIDC trusted publishing ([#3441](https://github.com/pdm-project/pdm/issues/3441))
### Bug Fixes
- Installation error for local plugins specified with file URL without a name. ([#3407](https://github.com/pdm-project/pdm/issues/3407))
- Eliminate the warning about inherit_metadata when using uv mode. ([#3434](https://github.com/pdm-project/pdm/issues/3434))
- Fix an installation failure when installing editable local dependencies on Windows and Python 3.13. ([#3444](https://github.com/pdm-project/pdm/issues/3444))
- Fix a bug that overridden requirements in lock file get rewritten when adding a new requirement. ([#3446](https://github.com/pdm-project/pdm/issues/3446))
- Cyclic group inclusion is detected incorrectly. Also show the cyclic group names in the error message. ([#3447](https://github.com/pdm-project/pdm/issues/3447))
- Fix a bug that `pdm remove` doesn't handle dependency groups include correctly. ([#3452](https://github.com/pdm-project/pdm/issues/3452))
- Update `unearth` to address an issue downloading git repos with short commit hash. ([#3455](https://github.com/pdm-project/pdm/issues/3455))
## Release v2.23.0 (2025-04-01)
### Features & Improvements
- Add `pdm python find` command to search for a python interpreter. ([#3389](https://github.com/pdm-project/pdm/issues/3389))
- `pdm import` now converts `package-mode` from Poetry's settings table to `distribution`. ([#3427](https://github.com/pdm-project/pdm/issues/3427))
### Bug Fixes
- Excluding non-existing groups for `pdm remove`. ([#3404](https://github.com/pdm-project/pdm/issues/3404))
- Fix a bug that `pdm add` and `pdm update` remove dependency groups incorrectly. ([#3418](https://github.com/pdm-project/pdm/issues/3418))
- Fix a bug that using resolution overrides drops extra dependencies. ([#3426](https://github.com/pdm-project/pdm/issues/3426))
## Release v2.22.4 (2025-03-07)
### Bug Fixes
- Ensure dev-dependencies are added to the correct group when the `tool.pdm.dev-dependencies` table has groups. ([#3392](https://github.com/pdm-project/pdm/issues/3392))
## Release v2.22.3 (2025-01-27)
### Bug Fixes
- Don't validate local file requirements that are not used. ([#3376](https://github.com/pdm-project/pdm/issues/3376))
- Don't set "dependencies" as empty list for uv toml if there is no dependencies in the raw toml file. ([#3378](https://github.com/pdm-project/pdm/issues/3378))
- Add a dummy project name to the script environment pyproject.toml. ([#3382](https://github.com/pdm-project/pdm/issues/3382))
## Release v2.22.2 (2025-01-11)
### Features & Improvements
- Write installer metadata like `INSTALLER` and `REQUESTED` to dist-info directory when installing packages. ([#3359](https://github.com/pdm-project/pdm/issues/3359))
- Respect `.python-version` file in the project root directory when selecting the Python interpreter. By default, it will be written when running `pdm use` command. ([#3367](https://github.com/pdm-project/pdm/issues/3367))
### Bug Fixes
- Fix a problem of missing dependencies when adding to dev dependencies if both editable and non-editable dependencies exist. ([#3361](https://github.com/pdm-project/pdm/issues/3361))
- Use stdlib for URL <-> Path conversions. ([#3362](https://github.com/pdm-project/pdm/issues/3362))
- `shellingham.detect_shell()` returns `('tcsh', '/bin/tcsh')` for tcsh on FreeBSD, so the current code tries to use the Bash venv activation script and fails due to syntax error. This change fixes the issue. ([#3366](https://github.com/pdm-project/pdm/issues/3366))
- Fix a performance issue because pypi source credentials were being queried many times from keyring. ([#3368](https://github.com/pdm-project/pdm/issues/3368))
## Release v2.22.1 (2024-12-19)
### Bug Fixes
- Fix zsh hanging issue by removing PyPI package completion. ([#3329](https://github.com/pdm-project/pdm/issues/3329))
- Write dev dependencies to `dependency-groups` section when importing project from other package managers. ([#3354](https://github.com/pdm-project/pdm/issues/3354))
### Miscellany
- Show a warning when resolving against cross-platform targets under uv mode. ([#3341](https://github.com/pdm-project/pdm/issues/3341))
## Release v2.22.0 (2024-12-09)
### Features & Improvements
- Use minimal template if the project is an application. ([#3295](https://github.com/pdm-project/pdm/issues/3295))
- Add one `safe_compatible` version specifiers saving strategy. ([#3301](https://github.com/pdm-project/pdm/issues/3301))
- Allow customizing scripts display with `scripts.show_header` settings. ([#3313](https://github.com/pdm-project/pdm/issues/3313))
- Speed up the resolution by only resolving wheel candidates if possible. ([#3319](https://github.com/pdm-project/pdm/issues/3319))
- Drop version from the search result, following the change of warehouse. ([#3328](https://github.com/pdm-project/pdm/issues/3328))
- Support `overrides` settings under `[tool.pdm.resolution]` with use_uv ([#3330](https://github.com/pdm-project/pdm/issues/3330))
### Bug Fixes
- No longer requires `wheel` to build a setuptools-backed package. ([#3320](https://github.com/pdm-project/pdm/issues/3320))
- Fix an inconsistent behavior when running `pdm remove <package>` with uv enabled. ([#3323](https://github.com/pdm-project/pdm/issues/3323))
- Fix: uninstallation error when pdm is not installed before. ([#3325](https://github.com/pdm-project/pdm/issues/3325))
- Fix a bug in uv mode that direct URL dependencies can't be installed. ([#3332](https://github.com/pdm-project/pdm/issues/3332))
- Fix a crash issue when rewriting dependency groups with `include-group` items. ([#3333](https://github.com/pdm-project/pdm/issues/3333))
- Also read username from keyring if missing in source/repository config. ([#3334](https://github.com/pdm-project/pdm/issues/3334))
- Allow configuring repositories in project. ([#3335](https://github.com/pdm-project/pdm/issues/3335))
### Miscellany
- Mark tests that require uv and skip them if uv is not found. ([#3324](https://github.com/pdm-project/pdm/issues/3324))
## Release v2.21.0 (2024-11-25)
### Features & Improvements
- Pass original working directory as env variable to pdm scripts ([#3179](https://github.com/pdm-project/pdm/issues/3179))
- Output similar commands or script command when the input command is not correct ([#3270](https://github.com/pdm-project/pdm/issues/3270))
- improve readability of Python interpreter validation message ([#3276](https://github.com/pdm-project/pdm/issues/3276))
- Print task name by default when using `pdm run` ([#3277](https://github.com/pdm-project/pdm/issues/3277))
- Make `OrderedSet.__contains__` run in O(1) ([#3280](https://github.com/pdm-project/pdm/issues/3280))
- Emit `post_lock` after writing pyproject.toml and pdm.lock in add/update ([#3285](https://github.com/pdm-project/pdm/issues/3285))
- Drop support of Python 3.8 ([#3298](https://github.com/pdm-project/pdm/issues/3298))
### Bug Fixes
- Fix the name normalization issue for optional dependency groups. ([#3271](https://github.com/pdm-project/pdm/issues/3271))
- Don't use uv when installing plugins in project. ([#3283](https://github.com/pdm-project/pdm/issues/3283))
- Fix the bug that pdm plugins are invalid after installation on ubuntu system python. ([#3289](https://github.com/pdm-project/pdm/issues/3289))
## Release v2.20.1 (2024-11-09)
### Features & Improvements
- Add a fixer to remove the deprecated `cross_platform` strategy from lock file. ([#3259](https://github.com/pdm-project/pdm/issues/3259))
### Bug Fixes
- Fix the bug that `pdm build` would fail when `use_uv` is true. ([#3231](https://github.com/pdm-project/pdm/issues/3231))
- Fix group name normalization when comparing groups. ([#3247](https://github.com/pdm-project/pdm/issues/3247))
- Inherit file descriptors instead of closing when running child processes in `pdm run`. ([#3252](https://github.com/pdm-project/pdm/issues/3252))
- Fix using `no_proxy` when `all_proxy` is set. ([#3254](https://github.com/pdm-project/pdm/issues/3254))
- Preserve multiline arrays and don't add empty tool.pdm table header when updating the pyproject.toml. ([#3258](https://github.com/pdm-project/pdm/issues/3258))
- Fix compatibility of `ErrorArgumentParser` for Python 3.12 and above. ([#3264](https://github.com/pdm-project/pdm/issues/3264))
## Release v2.20.0 (2024-10-31)
### Features & Improvements
- Support dependency groups as standardized by [PEP 735](https://peps.python.org/pep-0735/). By default, dev dependencies will be written to `[dependency-groups]` table. ([#3230](https://github.com/pdm-project/pdm/issues/3230))
### Bug Fixes
- Fix a bug that `strategy.inherit_metadata` config is not honored when using `--lockfile` option. ([#3232](https://github.com/pdm-project/pdm/issues/3232))
- Always perform install-time resolution when `use_uv` is on. ([#3233](https://github.com/pdm-project/pdm/issues/3233))
### Miscellany
- Update `resolvelib` to 1.1.0. ([#3235](https://github.com/pdm-project/pdm/issues/3235))
## Release v2.19.3 (2024-10-19)
### Features & Improvements
- Allow linking existing Python interpreters to PDM's managed location. ([#3215](https://github.com/pdm-project/pdm/issues/3215))
### Bug Fixes
- Fix a bug that overrides provided by environment variables do not work. ([#3182](https://github.com/pdm-project/pdm/issues/3182))
- Allow prereleases when the requirement is pinned even if disabled by project ([#3202](https://github.com/pdm-project/pdm/issues/3202))
- Pass the python path to the uv venv command. ([#3204](https://github.com/pdm-project/pdm/issues/3204))
- Fix the infinite loop when running in uv mode if the current project has dynamic metadata. ([#3207](https://github.com/pdm-project/pdm/issues/3207))
- Add `--no-frozen-deps` option to `install-pdm.py` script to allow installing newer versions of dependencies. ([#3213](https://github.com/pdm-project/pdm/issues/3213))
- `pdm self update` now prefers the locked dependencies unless `--no-frozen-deps` is specified. ([#3216](https://github.com/pdm-project/pdm/issues/3216))
- By default, `pdm outdated` will only list direct dependencies. This can be changed by adding the `--include-sub` option. ([#3218](https://github.com/pdm-project/pdm/issues/3218))
### Documentation
- Show users the way to uninstall pdm in a more obvious way ([#2470](https://github.com/pdm-project/pdm/issues/2470))
## Release v2.19.2 (2024-10-11)
### Features & Improvements
- Support installing free-threaded Python interpreters with the `t` suffix. ([#3201](https://github.com/pdm-project/pdm/issues/3201))
### Bug Fixes
- `use_uv` fails to lock when there are non-ascii characters in pyproject.toml on Windows. ([#3181](https://github.com/pdm-project/pdm/issues/3181))
- Fix the `pre_install` and `post_install` signals receiving an exhausted generator, instead of a list of packages. ([#3190](https://github.com/pdm-project/pdm/issues/3190))
- Create backup file with random filename to avoid conflicts. ([#3193](https://github.com/pdm-project/pdm/issues/3193))
- Fix the logic error in the `uv` format marker matching. ([#3197](https://github.com/pdm-project/pdm/issues/3197))
- `pdm lock --check` on a lockfile generated with older PDM version has a 0 exit code when there's a change in `pyproject.toml`. ([#3199](https://github.com/pdm-project/pdm/issues/3199))
### Documentation
- Fixed *Bash Completion* suggestion so it doesn't require root privileges ([#3183](https://github.com/pdm-project/pdm/issues/3183))
## Release v2.19.1 (2024-09-23)
### Bug Fixes
- PDM libraries are not loaded correctly for in-process scripts when installed in the user site. ([#3178](https://github.com/pdm-project/pdm/issues/3178))
## Release v2.19.0 (2024-09-23)
### Breaking Changes
- The minimum supported Python version of projects using PDM has been bumped to 3.8. ([#3176](https://github.com/pdm-project/pdm/issues/3176))
### Bug Fixes
- Fallback version to 0.0.0 when the version is not specified or empty. This can avoid crash when building such project. ([#3163](https://github.com/pdm-project/pdm/issues/3163))
- Ensures that `/` is URL encoded in sources URL environment variables. ([#3169](https://github.com/pdm-project/pdm/issues/3169))
- Call functions from shared library in the in-process `env_spec.py` script. ([#3176](https://github.com/pdm-project/pdm/issues/3176))
### Removals and Deprecations
- PDM no longer falls back to `setuptools-pep660` when the build backend doesn't support PEP 660. ([#3159](https://github.com/pdm-project/pdm/issues/3159))
### Miscellany
- Change the project structure to a normal package from a namespace package. ([#3155](https://github.com/pdm-project/pdm/issues/3155))
## Release v2.18.2 (2024-09-10)
### Bug Fixes
- Respect the `excludes` and `overrides` settings when installing packages. ([#3113](https://github.com/pdm-project/pdm/issues/3113))
- Fix a bug of export command that packages with extras are included twice. ([#3123](https://github.com/pdm-project/pdm/issues/3123))
- Remove empty groups when removing packages with `pdm remove`. ([#3133](https://github.com/pdm-project/pdm/issues/3133))
- When running `pdm venv purge`, if the current project's python version had been referencing the removed venv then clear it out. ([#3137](https://github.com/pdm-project/pdm/issues/3137))
- Fix command `pdm config` to not show site configuration file path if it doesn't exist. ([#3149](https://github.com/pdm-project/pdm/issues/3149))
- Now when `--no-markers` is used, the exported requirements can only work on the current platform. ([#3152](https://github.com/pdm-project/pdm/issues/3152))
### Miscellany
- Skip tests related to python installation on non-standard platforms. ([#3053](https://github.com/pdm-project/pdm/issues/3053))
## Release v2.19.0a0 (2024-09-05)
### Breaking Changes
- `pre_install` and `post_install` signals now receive the list of packages to be installed, instead of a candidate mapping. ([#3144](https://github.com/pdm-project/pdm/issues/3144))
### Features & Improvements
- Deprecate `Core.synchronizer_class` attribute. To get the synchronizer class, use `Project.get_synchronizer` method instead.
Deprecate `Core.resolver_class` attribute. To get the resolver class, use `Project.get_resolver` method instead. ([#3144](https://github.com/pdm-project/pdm/issues/3144))
- Add experimental support for `uv` as the resolver and installer. One can opt in by setting `use_uv` to `true` using `pdm config` command. ([#3144](https://github.com/pdm-project/pdm/issues/3144))
## Release v2.18.1 (2024-08-16)
### Bug Fixes
- Skip checking `project.name` if it is absent when running `pdm outdated`. ([#3095](https://github.com/pdm-project/pdm/issues/3095))
- Don't remove the `cross_platform` strategy from old lock files. ([#3105](https://github.com/pdm-project/pdm/issues/3105))
- Fix a bug that the VCS revision is lost if the candidate metadata is cached during resolution. ([#3107](https://github.com/pdm-project/pdm/issues/3107))
- Fix a bug that PDM can't delete source password when saved in keyring. ([#3108](https://github.com/pdm-project/pdm/issues/3108))
## Release v2.18.0 (2024-08-14)
### Features & Improvements
- Respect certificates in env vars `REQUESTS_CA_BUNDLE` and `CURL_CA_BUNDLE` when verifying SSL certificates. ([#3076](https://github.com/pdm-project/pdm/issues/3076))
- Allow pypi.verify_ssl to be configured via PDM_PYPI_VERIFY_SSL environmental variable. ([#3081](https://github.com/pdm-project/pdm/issues/3081))
- Clean logs older than 7 days. ([#3091](https://github.com/pdm-project/pdm/issues/3091))
- Polish the UI looking of locking packages to display the progress. ([#3100](https://github.com/pdm-project/pdm/issues/3100))
### Bug Fixes
- Fixed `pdm venv activate` to remove quotes such that `iex (pdm venv activate)` works correctly ([#2895](https://github.com/pdm-project/pdm/issues/2895))
- Don't crash if the version can't be resolved from the self project. ([#3077](https://github.com/pdm-project/pdm/issues/3077))
- Don't fail `install-pdm.py` if there is an invalid `pyproject.toml` file under the current directory. ([#3085](https://github.com/pdm-project/pdm/issues/3085))
- Make it able to expand env vars in the the dotenv file. Expose `PDM_PROJECT_ROOT` to the dotenv file for expansion. ([#3087](https://github.com/pdm-project/pdm/issues/3087))
- Fix a bug that Python markers from the existing locked packages are considered when locking with `--append` option. ([#3089](https://github.com/pdm-project/pdm/issues/3089))
- Backfill urls from configured indexed when exporting to requirements.txt. ([#3094](https://github.com/pdm-project/pdm/issues/3094))
- Consider the auto-selected Python range when installing from requirements.txt. ([#3095](https://github.com/pdm-project/pdm/issues/3095))
- Fix a bug that env vars do not override project config correctly. ([#3099](https://github.com/pdm-project/pdm/issues/3099))
## Release v2.17.3 (2024-08-01)
### Bug Fixes
- Fix a crash issue when `requires-python` is absent in the project metadata. ([#3062](https://github.com/pdm-project/pdm/issues/3062))
- Now correctly sets related config for PDM_IGNORE_SAVED_PYTHON when it is set to "false", "no", "0". ([#3064](https://github.com/pdm-project/pdm/issues/3064))
- Fix a bug that PDM plugins installed from project-root cannot be loaded, if they have dependencies. ([#3067](https://github.com/pdm-project/pdm/issues/3067))
## Release v2.17.2 (2024-07-31)
### Features & Improvements
- Improve the installation progress output to show the time elapsed. ([#3051](https://github.com/pdm-project/pdm/issues/3051))
- The effect of `pypi.ignore_stored_index` changes a bit. Now even if it is true, index configurations in the config will still be loaded if the index is listed in the `pyproject.toml`. ([#3052](https://github.com/pdm-project/pdm/issues/3052))
### Bug Fixes
- Ignore invalid requires-python values from index. ([#3038](https://github.com/pdm-project/pdm/issues/3038))
- Fix the group selection logic, to make `--without GROUP` work as expected. ([#3045](https://github.com/pdm-project/pdm/issues/3045))
- Suppress outputs for `pdm python install --quiet`. ([#3049](https://github.com/pdm-project/pdm/issues/3049))
## Release v2.17.1 (2024-07-19)
### Bug Fixes
- Raise dep-logic lower bound to 0.4.2 to fix issues with pdm lock after upgrading from older pdm versions ([#3033](https://github.com/pdm-project/pdm/issues/3033))
- Correct the current platform and architecture for win32 and macos systems. ([#3035](https://github.com/pdm-project/pdm/issues/3035))
### Miscellany
- Fix zsh completions ([#3031](https://github.com/pdm-project/pdm/issues/3031))
## Release v2.17.0 (2024-07-18)
### Breaking Changes
- `LockedRepository.all_candidates` now returns a `dict[str, list[Candidate]]` instead of `dict[str, Candidate]`. ([#2995](https://github.com/pdm-project/pdm/issues/2995))
- `post_lock` hook now receives a resolution result of type `dict[str, list[Candidate]]`, instead of `dict[str, Candidate]`. ([#2995](https://github.com/pdm-project/pdm/issues/2995))
### Features & Improvements
- Support reading requirement constraints from pip-style requirement files for "overriding" via `--override` option. ([#2896](https://github.com/pdm-project/pdm/issues/2896))
- Add a `--non-interactive` option for automation scenarios, also interactive prompts will not show up when not running in an interactive terminal. ([#2934](https://github.com/pdm-project/pdm/issues/2934))
- Refactored `pdm python install --list` to reuse the same implementation as other cli commands that work with Python interpreters from pbs_installer. ([#2977](https://github.com/pdm-project/pdm/issues/2977))
- Add `--license` and `--project-version` as CLI options to control and streamline them during `pdm init` - especially in automated scenarios with `--non-interactive` ([#2978](https://github.com/pdm-project/pdm/issues/2978))
- Run pdm sync in "post-rewrite" stage of pre-commit ([#2994](https://github.com/pdm-project/pdm/issues/2994))
- `Project.get_dependencies()` now returns a list of `Requirement` instead of a mapping.
The first argument of `Project.add_dependencies()` now accepts a list of `Requirement` instead of a mapping.
The old usage will be kept working for a short period of time and will be removed in the future. ([#2995](https://github.com/pdm-project/pdm/issues/2995))
- Support locking for specific target, which is a combination of (python, platform, implementation) triple. Bump lock file version to `4.5.0`.
Example usage: `pdm lock --platform=linux --python="==3.8.*" --implementation=cpython`. See the [docs](https://pdm-project.org/en/latest/usage/lock-targets) for more details. ([#2995](https://github.com/pdm-project/pdm/issues/2995))
- Rename `--reuse-env` to `--recreate` for `run` command, and reverse the behavior. ([#2999](https://github.com/pdm-project/pdm/issues/2999))
- PDM is now published with optional pinned dependencies using the pdm plugin [pdm-build-locked](https://pdm-build-locked.readthedocs.io/).
To install pdm with its dependencies pinned to the versions it was tested with, run:
```bash
pipx install pdm[locked]
```
To install optional dependency group copier:
```bash
pipx install pdm[locked,copier-locked]
```
This feature is entirely optional. Installing pdm without the extra will work the same way as before this change. ([#3001](https://github.com/pdm-project/pdm/issues/3001))
- Added `--clean-unselected` alias for `--only-keep` ([#3007](https://github.com/pdm-project/pdm/issues/3007))
- Group options for update strategy and save strategy. ([#3016](https://github.com/pdm-project/pdm/issues/3016))
### Bug Fixes
- When locking dependencies that references the self project, the referenced groups should also be recorded in the lockfile. ([#2976](https://github.com/pdm-project/pdm/issues/2976))
- Retry failed installation jobs if they are run sequentially, such as for editable dependencies. ([#3005](https://github.com/pdm-project/pdm/issues/3005))
- Fix the local path issue when `-p` is passed to change the project root. ([#3009](https://github.com/pdm-project/pdm/issues/3009))
- Fix a bug that PDM can't install editable self package with non-isolated build in one go. ([#3018](https://github.com/pdm-project/pdm/issues/3018))
- Add context when parsing version failed. ([#3020](https://github.com/pdm-project/pdm/issues/3020))
- Fix a mistake in build env setup that will cause the `PATH` env var length to grow. ([#3022](https://github.com/pdm-project/pdm/issues/3022))
### Removals and Deprecations
- Remove the deprecation warning of `BaseCommand.__init__()` method. Now it doesn't take any arguments. ([#2995](https://github.com/pdm-project/pdm/issues/2995))
- `Provider.get_reuse_candidate()` method is deprecated in favor of `Provider.iter_reuse_candidates()`, to return an iterable of reuse candidates. ([#2995](https://github.com/pdm-project/pdm/issues/2995))
- `--no-markers` option in `pdm export` command becomes a no-op and is marked as deprecated, because it doesn't make sense anymore. ([#2995](https://github.com/pdm-project/pdm/issues/2995))
- `ignore_compatibility` parameter of `Project.get_provider()`/`Project.get_repository()`/`Environment.get_finder()` is deprecated. Pass in a `EnvSpec` via `env_spec` parameter instead.
`requires_python` parameter of `pdm.resolver.core.resolve()` function is deprecated and has no effect.
`cross_platform` parameter of `pdm.cli.actions.resolve_candidates_from_lockfile()` function is deprecated and has no effect. ([#2995](https://github.com/pdm-project/pdm/issues/2995))
## Release v2.16.1 (2024-06-26)
### Bug Fixes
- Fix new interface from pbs_installer regarding `build_dir` and best match auto-install strategy for `pdm use`
(same as for `pdm python install --list`) ([#2943](https://github.com/pdm-project/pdm/issues/2943))
- Fix crash when pdm is used with `importlib-metadata` version 8.0. ([#2974](https://github.com/pdm-project/pdm/issues/2974))
## Release v2.16.0 (2024-06-25)
### Features & Improvements
- Add `--no-extras` to `pdm export` to strip extras from the requirements. Now the default behavior is to keep extras. ([#2519](https://github.com/pdm-project/pdm/issues/2519))
- Support PEP 723: running scripts with inline metadata in standalone environment with dependencies. ([#2924](https://github.com/pdm-project/pdm/issues/2924))
- `pdm use` and `pdm python install` now take `requires-python` into account (incl. from pyproject.toml) if python version
not specified and `pdm use` provides auto installation by that. ([#2943](https://github.com/pdm-project/pdm/issues/2943))
- `--no-isolation` no longer installs `build-requires` nor dynamic build dependencies, to be consistent with `pip`. ([#2944](https://github.com/pdm-project/pdm/issues/2944))
- Add notifiers in CLI output when global project is being used. ([#2952](https://github.com/pdm-project/pdm/issues/2952))
- Use `tool.pdm.resolution` table when calculating the content hash of project file, previously only `overrides` table was used.
This will change the hash already stored in the lockfile, so bump the lockfile version to `4.4.2`. ([#2956](https://github.com/pdm-project/pdm/issues/2956))
### Bug Fixes
- Add max retries on read timeout or bad connection. ([#2914](https://github.com/pdm-project/pdm/issues/2914))
- Don't update local files if they don't change. ([#2966](https://github.com/pdm-project/pdm/issues/2966))
- Don't list python versions that don't have any installation link for the current platform. ([#2970](https://github.com/pdm-project/pdm/issues/2970))
### Documentation
- Clarify the purposes of `pdm outdated` and `--unconstrained` option. ([#2965](https://github.com/pdm-project/pdm/issues/2965))
- Some clarifications on the interpreter selection and central package cache. ([#2967](https://github.com/pdm-project/pdm/issues/2967))
## Release v2.15.4 (2024-05-30)
### Bug Fixes
- Build wheel from sdist if available, to make sure sdist is built properly. This behavior is consistent with [pypa/build](https://pypi.org/project/build). ([#2843](https://github.com/pdm-project/pdm/issues/2843))
- Fix the issue of self-referencing extra dependencies failing to be resolved for local packages. ([#2898](https://github.com/pdm-project/pdm/issues/2898))
- Fix an issue of max recursion depth error when parsing a poetry project with circular dependencies on local packages. ([#2900](https://github.com/pdm-project/pdm/issues/2900))
- Fix a bug that VCS dependencies and `--self` don't work in the exported requirements.txt with hashes. ([#2908](https://github.com/pdm-project/pdm/issues/2908))
- Fix a cache miss when there exist built wheels for a given link. ([#2912](https://github.com/pdm-project/pdm/issues/2912))
- Don't try to store caches when `--no-cache` is given. ([#2913](https://github.com/pdm-project/pdm/issues/2913))
## Release v2.15.3 (2024-05-20)
### Bug Fixes
- Fixed pdm venv activate, to also work for windows. And added documentation on how to authenticate to Azure Artifacts ([#2851](https://github.com/pdm-project/pdm/issues/2851))
- Don't show unsupported formats in `pdm export`. ([#2877](https://github.com/pdm-project/pdm/issues/2877))
- Proxy (`HTTP_PROXY` env vars) settings are ignored for custom indexes. ([#2880](https://github.com/pdm-project/pdm/issues/2880))
- Fix the quoting of venv activate command for powershell. ([#2881](https://github.com/pdm-project/pdm/issues/2881))
- Raise an error if the package given by `pdm update` does not exist in the select dependency group but in other groups. ([#2885](https://github.com/pdm-project/pdm/issues/2885))
## Release v2.15.2 (2024-05-08)
### Features & Improvements
- Use `get_runner()` method to build the task runner in `run` command. `runner_cls` attribute is deprecated. ([#2872](https://github.com/pdm-project/pdm/issues/2872))
### Bug Fixes
- Expand `${PROJECT_ROOT}` in source URLs. ([#2846](https://github.com/pdm-project/pdm/issues/2846))
- Fix env and other options being inherited in nested composite scripts. ([#2849](https://github.com/pdm-project/pdm/issues/2849))
- Keep the `${PROJECT_ROOT}` variable in dependencies after running `pdm lock --update-reuse`. ([#2852](https://github.com/pdm-project/pdm/issues/2852))
- Make `direct_minimal_versions` work on newly added dependencies. ([#2853](https://github.com/pdm-project/pdm/issues/2853))
- Fix a syntax error in the zsh completion script. ([#2868](https://github.com/pdm-project/pdm/issues/2868))
## Release v2.15.1 (2024-04-25)
### Bug Fixes
- Disable check update in `zsh` completion script. ([#2838](https://github.com/pdm-project/pdm/issues/2838))
- Fixes cached packages metadata files (`.referrers`) collisions on `sync` when using a `venv` with `symlink` cache method. ([#2839](https://github.com/pdm-project/pdm/issues/2839))
### Documentation
- Build docs with object inventory to support cross references from Sphinx documentation projects. ([#2841](https://github.com/pdm-project/pdm/issues/2841))
## Release v2.15.0 (2024-04-19)
### Features & Improvements
- Packages format preferences can now be defined in the project `pyproject.toml`
using the `no-binary`, `only-binary` and `prefer-binary` keys of the `tool.pdm.resolution` section. ([#2656](https://github.com/pdm-project/pdm/issues/2656))
### Bug Fixes
- Don't create project and virtualenv when running `pdm python install`. ([#2809](https://github.com/pdm-project/pdm/issues/2809))
- Clean up the python installation directory if a previous download was unsuccessful. ([#2810](https://github.com/pdm-project/pdm/issues/2810))
- Don't cache editable installations. ([#2816](https://github.com/pdm-project/pdm/issues/2816))
- Fix a bug that installing in-project plugins with editable local paths doesn't work. ([#2820](https://github.com/pdm-project/pdm/issues/2820))
- Don't create log directory until it's needed, to fix a PermissionError in docker environment. ([#2825](https://github.com/pdm-project/pdm/issues/2825))
- Fix recursive script detection on multiple invocations. ([#2829](https://github.com/pdm-project/pdm/issues/2829))
## Release v2.14.0 (2024-04-12)
### Features & Improvements
- Revert the package cache introduced in 2.13. Don't cache the decompressed contents of wheels unless being told so. ([#2803](https://github.com/pdm-project/pdm/issues/2803))
### Bug Fixes
- Fix inconsistent logging when `pdm use` a different python interpreter ([#2776](https://github.com/pdm-project/pdm/issues/2776))
- Fix PDM unable to find Python interpreters when `PDM_IGNORE_ACTIVE_VENV` is set ([#2779](https://github.com/pdm-project/pdm/issues/2779))
- Check verify_ssl when trusting each source. ([#2784](https://github.com/pdm-project/pdm/issues/2784))
- Fix name check for project itself in `pdm outdated` ([#2785](https://github.com/pdm-project/pdm/issues/2785))
- Fix a regression that proxy env vars are not respected. ([#2788](https://github.com/pdm-project/pdm/issues/2788))
- Fix an issue that venv provider can't be found when providers are explicitly configured. ([#2792](https://github.com/pdm-project/pdm/issues/2792))
- Fix a bug that `[tool.pdm.options]` are ignored if `-c/--config CONFIG` is given. ([#2793](https://github.com/pdm-project/pdm/issues/2793))
- Make `--without` respect groups in `dev-dependencies` ([#2799](https://github.com/pdm-project/pdm/issues/2799))
## Release v2.13.3 (2024-04-08)
### Bug Fixes
- Per-source configuration for ca-certs and client-cert. [#2754](https://github.com/pdm-project/pdm/issues/2754)
- Remove all caches by removing individual cache types one by one. [#2757](https://github.com/pdm-project/pdm/issues/2757)
- Use the default HTTP client when downloading the pythons, to use the certificates settings. [#2759](https://github.com/pdm-project/pdm/issues/2759)
- Fix a race condition where pth files take effect when multiple packages are installed in parallel. [#2762](https://github.com/pdm-project/pdm/issues/2762)
- Refuse to run recursive composite scripts. [#2766](https://github.com/pdm-project/pdm/issues/2766)
## Release v2.13.2 (2024-03-30)
### Bug Fixes
- Fix errors when parsing poetry format that contains special characters in author name.
Poetry-specific `parse_name_email` and `NAME_EMAIL_RE` moved from `pdm.formats.base` to `pdm.formats.poetry`. [#2665](https://github.com/pdm-project/pdm/issues/2665)
- Fix a race condition in cached packages. When a cached package is being created it shouldn't be used for installation. [#2739](https://github.com/pdm-project/pdm/issues/2739)
- Add back `PreparedCandidate.build()` for backward-compatibility. [#2747](https://github.com/pdm-project/pdm/issues/2747)
### Documentation
- Fixed a small non-code typo in docs and provided better wording. [#2740](https://github.com/pdm-project/pdm/issues/2740)
## Release v2.13.1 (2024-03-29)
### Bug Fixes
- Fix a bug that PDM couldn't find interpreters for global project. [#2726](https://github.com/pdm-project/pdm/issues/2726)
- Make the cache package path shorter to solve the Windows path problem. [#2730](https://github.com/pdm-project/pdm/issues/2730)
### Documentation
- Extract "Lock file" doc from "Manage Dependencies" doc. [#2725](https://github.com/pdm-project/pdm/issues/2725)
## Release v2.13.0 (2024-03-27)
### Features & Improvements
- Add option to exclude group(s) when running ```pdm sync/install -G:all``` by adding flag ```--without group1,group2,...``` [#2258](https://github.com/pdm-project/pdm/issues/2258)
- Default to log to user home and make logs directory configurable. [#2398](https://github.com/pdm-project/pdm/issues/2398)
- Add an option `keep_going` to continue on errors for composite scripts and return the last failing exit code. [#2582](https://github.com/pdm-project/pdm/issues/2582)
- Add an option `working_dir` for PDM's scripts to set the current working directory. [#2620](https://github.com/pdm-project/pdm/issues/2620)
- Allow updating specific sub-dependencies (i.e., transitive dependencies) in the lock file. [#2628](https://github.com/pdm-project/pdm/issues/2628)
- Add `--config-setting` option to `add/install/sync/update/remove/export` commands, the config settings dictionary will be shared by all packages. [#2636](https://github.com/pdm-project/pdm/issues/2636)
- Cache the decompressed contents of wheels for faster access. [#2660](https://github.com/pdm-project/pdm/issues/2660)
- Add configuration for timeout for network requests. [#2680](https://github.com/pdm-project/pdm/issues/2680)
- Reuse the request session within the environment. [#2697](https://github.com/pdm-project/pdm/issues/2697)
- Caches can be disabled by using the `--no-cache` option or setting the `PDM_NO_CACHE` environment variable. [#2702](https://github.com/pdm-project/pdm/issues/2702)
- Switch to `httpx.Client` for HTTP requests, drop `requests` dependency. [#2709](https://github.com/pdm-project/pdm/issues/2709)
- We have timemachine now! You can exclude packages published newer than a certain date via `pdm lock --exclude-newer=<date>`, allowing reproduction of resolutions regardless of new package releases. [#2712](https://github.com/pdm-project/pdm/issues/2712)
- Add command `pdm outdated` to check the outdated packages and list the latest versions. [#2718](https://github.com/pdm-project/pdm/issues/2718)
- When `python.use_venv` is on, always try to create a virtualenv when using `pdm use` to switch the Python interpreter. [#2720](https://github.com/pdm-project/pdm/issues/2720)
- Support installing Pythons from [python-build-standalone](https://github.com/indygreg/python-build-standalone). Add command group `pdm python` to manage Python installations. And `pdm use` can automatically install the Python interpreter if it's not found. [#2721](https://github.com/pdm-project/pdm/issues/2721)
- Supports custom distribution files path via `-d/--dest` option for `pdm publish`. [#2723](https://github.com/pdm-project/pdm/issues/2723)
### Bug Fixes
- Don't modify TOML tables that are not related to PDM. [#2666](https://github.com/pdm-project/pdm/issues/2666)
- Made `--without` imply `--with :all`. [#2670](https://github.com/pdm-project/pdm/issues/2670)
- Expand user path for `venv.location` and other path-like config values. [#2672](https://github.com/pdm-project/pdm/issues/2672)
- Give a default version when it's missing in `pyproject.toml` when parsing candidate's metadata. [#2677](https://github.com/pdm-project/pdm/issues/2677)
- Fix the issue that ANSI codes are shown in the output of `pdm --help` on Windows. [#2678](https://github.com/pdm-project/pdm/issues/2678)
- Don't show empty configuration sections in `pdm config`. [#2683](https://github.com/pdm-project/pdm/issues/2683)
### Documentation
- Document the difference between `[tool.pdm.scripts]` and `[project.scripts]` [#2121](https://github.com/pdm-project/pdm/issues/2121)
### Removals and Deprecations
- Remove the support of `pth` cache method. And `symlink` cache method now behaves the same as `symlink_individual` cache method. [#2660](https://github.com/pdm-project/pdm/issues/2660)
- Remove `pdm.models.environment` module deprecated before. Also remove the renamed members from `pdm.environments`. [#2710](https://github.com/pdm-project/pdm/issues/2710)
### Miscellany
- Delete `setup.cfg`, move tool configurations under it to `pyproject.toml` [#2703](https://github.com/pdm-project/pdm/issues/2703)
Release v2.12.4 (2024-02-26)
----------------------------
### Features & Improvements
- Use env PDM_NO_EDITABLE as the default value for --no-editable option. [#2613](https://github.com/pdm-project/pdm/issues/2613)
### Bug Fixes
- Reset project.environment when importing from setup.py, to fix resolution error. [#2608](https://github.com/pdm-project/pdm/issues/2608)
- Do not fetch package hashes when `--frozen-lockfile` is passed. [#2630](https://github.com/pdm-project/pdm/issues/2630)
- Make sure non-venv interpreters are used by venv creator. [#2631](https://github.com/pdm-project/pdm/issues/2631)
- Don't cause a hard failure if the local directory doesn't exist. [#2650](https://github.com/pdm-project/pdm/issues/2650)
### Documentation
- Fix the default value for negative CLI flags. [#2642](https://github.com/pdm-project/pdm/issues/2642)
- Auto-gen configuration reference documentation. [#2645](https://github.com/pdm-project/pdm/issues/2645)
Release v2.12.3 (2024-02-01)
----------------------------
### Bug Fixes
- fix the package-type fixer won't update toml properly for "Nested Section Ordering Issue in TOML". [#2578](https://github.com/pdm-project/pdm/issues/2578)
- Unable to force override a package if the package is required with extras. [#2586](https://github.com/pdm-project/pdm/issues/2586)
- Failed to clone template repository if the URL contains the rev part. [#2597](https://github.com/pdm-project/pdm/issues/2597)
- Handle legacy specifiers when converting from poetry project. [#2599](https://github.com/pdm-project/pdm/issues/2599)
### Documentation
- Fix typo in template docs [#2588](https://github.com/pdm-project/pdm/issues/2588)
Release v2.12.2 (2024-01-21)
----------------------------
### Bug Fixes
- Fix the auto fixer for package-type. [#2564](https://github.com/pdm-project/pdm/issues/2564)
- Fix the wrong installation destination for header files when installing build requirements. [#2573](https://github.com/pdm-project/pdm/issues/2573)
- Install header files into package namespace under `include` directory. [#2574](https://github.com/pdm-project/pdm/issues/2574)
Release v2.12.1 (2024-01-17)
----------------------------
### Bug Fixes
- Hotfix: missing `identifier` attribute for package type fixer. [#2564](https://github.com/pdm-project/pdm/issues/2564)
Release v2.12.0 (2024-01-17)
----------------------------
### Features & Improvements
- Allow excluding packages from the lockfile via `tool.pdm.resolution.excludes` setting, the dependencies will also be skipped. [#1316](https://github.com/pdm-project/pdm/issues/1316)
- Rename `--no-lock` option to `--frozen-lockfile`. [#2496](https://github.com/pdm-project/pdm/issues/2496)
- Add `--no-hashes` as the recommended option name in favor of `--without-hashes` for `pdm export` command. [#2497](https://github.com/pdm-project/pdm/issues/2497)
- Add `--no-markers` to `export` command to exclude markers from the output. [#2497](https://github.com/pdm-project/pdm/issues/2497)
- Allow initializing a project without extra project files, with a new builtin template "minimal". Run it with `pdm init minimal`. [#2543](https://github.com/pdm-project/pdm/issues/2543)
- Change the warning category emitted by `deprecated_warning()` to `PDMDeprecationWarning`. [#2547](https://github.com/pdm-project/pdm/issues/2547)
- Prereleases will be allowed if a prerelease version is pinned in the lockfile. This can be disabled by passing `--stable` option. [#2552](https://github.com/pdm-project/pdm/issues/2552)
- Change `tracked_names` argument to keyword-only. Move `allow_prereleases` setting to `tool.pdm.resolution` table. [#2552](https://github.com/pdm-project/pdm/issues/2552)
- Rename the `preferred_pins` argument of provider classes to `locked_candidates`, and deprecate the old name. [#2552](https://github.com/pdm-project/pdm/issues/2552)
- Rename the `package-type` field under `tool.pdm` settings table to `distribution` to make it more clear. [#2564](https://github.com/pdm-project/pdm/issues/2564)
### Bug Fixes
- `tool.pdm.resolution` settings won't be honored when installing dependencies into the build environment. [#1316](https://github.com/pdm-project/pdm/issues/1316)
- Fixed pdm list output containing full license text in some cases [#2538](https://github.com/pdm-project/pdm/issues/2538)
- Fix the environment variable substitution for `cmd` scripts. [#2542](https://github.com/pdm-project/pdm/issues/2542)
- Allow normal extension modules in wheel tags when the python is debug build. [#2548](https://github.com/pdm-project/pdm/issues/2548)
- Don't use pypi.org when pypi.url is set. [#2560](https://github.com/pdm-project/pdm/issues/2560)
### Removals and Deprecations
- Remove deprecated methods from `Project`. Remove deprecated helper functions from `actions.py`. [#2547](https://github.com/pdm-project/pdm/issues/2547)
Release v2.11.2 (2024-01-02)
----------------------------
### Bug Fixes
- Fix a KeyError raised when resolving a URL dependency without package name given. [#2488](https://github.com/pdm-project/pdm/issues/2488)
- `pdm update --update-eager` can hit InconsistentCandidate error when dependency is included both through default dependencies and extra. [#2495](https://github.com/pdm-project/pdm/issues/2495)
- `pdm install` should not warn when overwriting its own symlinks on `install`/`update`. [#2502](https://github.com/pdm-project/pdm/issues/2502)
- Fix a bug that candidates without local version are rejected when the local version is pinned. [#2507](https://github.com/pdm-project/pdm/issues/2507)
### Documentation
- Add maturin as a compatible build backend in the docs. [#2510](https://github.com/pdm-project/pdm/issues/2510)
Release v2.11.1 (2023-12-14)
----------------------------
### Bug Fixes
- Update candidate names before resolving markers, to fix a KeyError when the requirement is not named. [#2488](https://github.com/pdm-project/pdm/issues/2488)
- Fix a KeyError when resolving packages that have parents that are no longer needed. [#2489](https://github.com/pdm-project/pdm/issues/2489)
Release v2.11.0 (2023-12-14)
----------------------------
### Features & Improvements
- Officially drop the support for Python 3.7.
- Allow exporting current project as editable dependency with `pdm export`. [#1910](https://github.com/pdm-project/pdm/issues/1910)
- Improve the lockfile compatibility checking by using 3-digit version numbers. This can distinguish forward-compatibility and backward-compatibility. [#2164](https://github.com/pdm-project/pdm/issues/2164)
- Add `--skip-existing` to `pdm publish` to ignore the uploading error if the package already exists. [#2362](https://github.com/pdm-project/pdm/issues/2362)
- Use `==major.minor.*` as default requires python for application projects. [#2382](https://github.com/pdm-project/pdm/issues/2382)
- We now use the `package-type` field in the `tool.pdm` table to differentiate between library and application projects. [#2394](https://github.com/pdm-project/pdm/issues/2394)
- Add support for {pdm} placeholder in script definitions to call the same PDM entrypoint [#2408](https://github.com/pdm-project/pdm/issues/2408)
- When exporting requirements, record the environment markers from all parents for each requirement. This allows the exported requirements to work on different platforms and Python versions. [#2418](https://github.com/pdm-project/pdm/issues/2418)
- `pdm lock` now supports `--update-reuse` option to keep the pinned versions in the lockfile if possible. [#2419](https://github.com/pdm-project/pdm/issues/2419)
- Introduce a new lock strategy `inherit_metadata` to inherit and merge markers from parent requirements. This is enabled by default when creating a new lockfile. [#2421](https://github.com/pdm-project/pdm/issues/2421)
- New cache methods: `symlink_individual` for creating a symlink for each individual package file and `hardlink` for creating hardlinks. [#2425](https://github.com/pdm-project/pdm/issues/2425)
- Add "pdm sync" pre-commit hook [#2474](https://github.com/pdm-project/pdm/issues/2474)
- New update strategy: `reuse-installed`. When this strategy is enabled, PDM will try to reuse the versions already installed in the environment, even if the package names are given in the command line following `add` or `update`. This strategy is supported by `add`, `update` and `lock` commands. [#2479](https://github.com/pdm-project/pdm/issues/2479)
- Show subcommand's help info when passing unrecognized arguments. [#2480](https://github.com/pdm-project/pdm/issues/2480)
- add `PDM_CACHE_DIR` environment variable to configure cache directory location. [#2485](https://github.com/pdm-project/pdm/issues/2485)
### Bug Fixes
- Use the same order of Python interpreters as interactive mode in `pdm init -n`. [#2436](https://github.com/pdm-project/pdm/issues/2436)
- `pdm init` now implies `--lib` if `--backend` is passed. [#2437](https://github.com/pdm-project/pdm/issues/2437)
- Fix a bug that link collection ignores package-index-binding. [#2442](https://github.com/pdm-project/pdm/issues/2442)
- Fix the wrong installation candidates for different architectures on Windows. [#2464](https://github.com/pdm-project/pdm/issues/2464)
- Fix installing PEP 561 stub-only packages with `install.cache_method = "symlink"`. [#2466](https://github.com/pdm-project/pdm/issues/2466)
- Fix a `KeyError` raised by `pdm update --unconstrained` when the project itself is listed as a dependency. [#2483](https://github.com/pdm-project/pdm/issues/2483)
Release v2.10.4 (2023-11-24)
----------------------------
### Bug Fixes
- Do not detect as requirements.txt if the file is a python script. [#2416](https://github.com/pdm-project/pdm/issues/2416)
- Provide information of the original line when parsing requirement fails. [#2417](https://github.com/pdm-project/pdm/issues/2417)
- Resolve `-r` requirements paths relative to the requirement file they are specified in [#2422](https://github.com/pdm-project/pdm/issues/2422)
- Updating package now overwrites the old files instead of removing before installing. [#2423](https://github.com/pdm-project/pdm/issues/2423)
Release v2.10.3 (2023-11-16)
----------------------------
### Bug Fixes
- Create virtualenv for conda base Python. [#2409](https://github.com/pdm-project/pdm/issues/2409)
Release v2.10.2 (2023-11-16)
----------------------------
### Features & Improvements
- Log the response text when `pdm publish` fails with HTTP error. [#2400](https://github.com/pdm-project/pdm/issues/2400)
### Bug Fixes
- Improve the error message when a specific package can't be found in the lockfile. [#2358](https://github.com/pdm-project/pdm/issues/2358)
- prevent wrong project name (including space and illegal characters) [#2360](https://github.com/pdm-project/pdm/issues/2360)
- Fix a bug that PDM cannot detect namespace packages correctly when creating symlinks. The package's `__init__.py` contains an unusual line. [#2378](https://github.com/pdm-project/pdm/issues/2378)
- Fix template files created by `pdm init` being read-only when copied from a read-only PDM installation. [#2379](https://github.com/pdm-project/pdm/issues/2379)
- Don't reset the build backend when asking for import. [#2388](https://github.com/pdm-project/pdm/issues/2388)
- Never wrap the output of the `export` command. [#2390](https://github.com/pdm-project/pdm/issues/2390)
- Forbid global project in conda base environment, since it may remove conda-managed packages. [#2409](https://github.com/pdm-project/pdm/issues/2409)
Release v2.10.1 (2023-11-07)
----------------------------
### Bug Fixes
- Fix a bug preventing ctrl-c from interrupting program execution on 2nd invocation when using "pdm run" (Windows only). [#2292](https://github.com/pdm-project/pdm/issues/2292)
- Fix list index out of range when build error message is empty. [#2337](https://github.com/pdm-project/pdm/issues/2337)
- Fix find_link sources being exported as `--extra--index-url` [#2342](https://github.com/pdm-project/pdm/issues/2342)
- Fix an installation failure when install.cache = true. [#2355](https://github.com/pdm-project/pdm/issues/2355)
- Fix a resolution issue that extra dependencies are not resolved when the bare dependency has more specific version constraint. [#2369](https://github.com/pdm-project/pdm/issues/2369)
### Documentation
- Set up a chatbot powered by LLM on the doc page. [#2365](https://github.com/pdm-project/pdm/issues/2365)
Release v2.10.0 (2023-10-26)
----------------------------
### Features & Improvements
- Allow binding packages to specific sources with `include_packages` and `exclude_packages` config under `tool.pdm.source` table. [#1645](https://github.com/pdm-project/pdm/issues/1645)
- Show warnings when a package is rejected by the resolve because of uncovered `requires-python` range. And provide a way to ignore them per-package. [#2304](https://github.com/pdm-project/pdm/issues/2304)
- Add `-q/--quiet` option to suppress some warnings printed to the console. This option is mutually exclusive with `-v/--verbose`. [#2304](https://github.com/pdm-project/pdm/issues/2304)
- Introduce a new `--strategy/-S` option for `lock` command, to specify one or more strategy flags for resolving dependencies. `--static-urls` and `--no-cross-platform` are deprecated at the same time. [#2310](https://github.com/pdm-project/pdm/issues/2310)
- Add lock option to resolve direct dependencies to the minimal versions available. [#2310](https://github.com/pdm-project/pdm/issues/2310)
- Report the progress of download and unpacking when installing packages. [#2328](https://github.com/pdm-project/pdm/issues/2328)
### Bug Fixes
- Change the venv backend clean function `pdm.cli.commands.venv.backend.Backend._ensure_clean` to empty the `.venv` folder instead of deleting it. [#2282](https://github.com/pdm-project/pdm/issues/2282)
- Fix a bug that dependency groups from Poetry 1.2+ do not migrate properly to PDM. [#2285](https://github.com/pdm-project/pdm/issues/2285)
- Fix a bug that build requirements are installed into wrong location when using `--venv` option. [#2314](https://github.com/pdm-project/pdm/issues/2314)
- Fix a bug that global repository setting results in TypeError . [#2330](https://github.com/pdm-project/pdm/issues/2330)
- Fix a credentials error when working with two indices on the same host [#2333](https://github.com/pdm-project/pdm/issues/2333)
### Miscellany
- Officially supports python3.12 now. [#2301](https://github.com/pdm-project/pdm/issues/2301)
Release v2.9.3 (2023-09-25)
---------------------------
### Bug Fixes
- Revert the changes to the behavior of installing self, introduced in #2162.
Self package won't be installed when `--no-default` is requested. [#2230](https://github.com/pdm-project/pdm/issues/2230)
- Reject the candidate if it contains invalid metadata, to avoid a crash in the process of resolution. [#2261](https://github.com/pdm-project/pdm/issues/2261)
### Documentation
- Clarify what `--no-isolated` does. [#2071](https://github.com/pdm-project/pdm/issues/2071)
Release v2.9.2 (2023-09-12)
---------------------------
### Features & Improvements
- Fix an issue that `--no-lock` option doesn't work as expected. Also support `--no-lock` option for `add`, `remove` and `update` commands. [#2245](https://github.com/pdm-project/pdm/issues/2245)
### Bug Fixes
- Use `findpython` to find pythons with the spec given by the user. [#2225](https://github.com/pdm-project/pdm/issues/2225)
- Use UTF-8 to read pyvenv.cfg. [#2227](https://github.com/pdm-project/pdm/issues/2227)
- On Windows, try looking for the `virtualenv` `python.exe` binary under `bin/`
as well as `Scripts/` and the `virtualenv`/`conda` root. [#2236](https://github.com/pdm-project/pdm/issues/2236)
- Write relocatable dependency URLs with `${PROJECT_ROOT}` variable in the lockfile. [#2240](https://github.com/pdm-project/pdm/issues/2240)
Release v2.9.1 (2023-09-03)
---------------------------
### Features & Improvements
- Support convert setup.cfg without existing setup.py. [#2222](https://github.com/pdm-project/pdm/issues/2222)
### Bug Fixes
- `pdm run` should only find local file if the command starts with `./`. [#2221](https://github.com/pdm-project/pdm/issues/2221)
Release v2.9.0 (2023-08-31)
---------------------------
### Features & Improvements
- Add an `--overwrite` option to `pdm init` to overwrite existing files(default False). [#2163](https://github.com/pdm-project/pdm/issues/2163)
- Support passing filter patterns as positional arguments to `pdm list` command.
Add `--tree` as an alias and preferred name of `--graph` option. [#2165](https://github.com/pdm-project/pdm/issues/2165)
- Switch to truststore by default. [#2195](https://github.com/pdm-project/pdm/issues/2195)
- Consider packages as installed if the venv includes them from the system-site-packages. [#2216](https://github.com/pdm-project/pdm/issues/2216)
- Allow `pdm run` to run a script with the relative or absolute path. [#2217](https://github.com/pdm-project/pdm/issues/2217)
### Bug Fixes
- Fix a bug that removing dev dependency uninstalls the project as well. [#2150](https://github.com/pdm-project/pdm/issues/2150)
- Fix a bug that `@ file://` dependencies can not be updated. [#2169](https://github.com/pdm-project/pdm/issues/2169)
- Fix a bug that dependencies requested out of the range of `requires-python` cause PDM to crash. [#2175](https://github.com/pdm-project/pdm/issues/2175)
- Fix the compatibility issue with copier 8.0+. [#2177](https://github.com/pdm-project/pdm/issues/2177)
- Makes `comparable_version("1.2.3+local1") == Version("1.2.3")`. [#2182](https://github.com/pdm-project/pdm/issues/2182)
- Default behavior for pdm venv activate when shell detection fails. [#2187](https://github.com/pdm-project/pdm/issues/2187)
- Handle parsing errors when converting from poetry-style metadata. [#2203](https://github.com/pdm-project/pdm/issues/2203)
- Don't copy .pyc files from the template directory. [#2213](https://github.com/pdm-project/pdm/issues/2213)
### Removals and Deprecations
- Remove the legacy build backend `pdm-pep517`. [#2167](https://github.com/pdm-project/pdm/issues/2167)
Release v2.8.2 (2023-07-31)
---------------------------
### Features & Improvements
- Allow setting username and password in URL for publish command [#2140](https://github.com/pdm-project/pdm/issues/2140)
### Bug Fixes
- Use UTF-8 encoding when writing `sitecustomize.py`. [#2139](https://github.com/pdm-project/pdm/issues/2139)
Release v2.8.1 (2023-07-26)
---------------------------
### Features & Improvements
- Add `keyring`, `copier`, `cookiecutter`, `template`, `truststore` dependency groups. [#2109](https://github.com/pdm-project/pdm/issues/2109)
- Ignore wheels for python versions not in range. [#2113](https://github.com/pdm-project/pdm/issues/2113)
- Read default value from env var `PDM_PROJECT` for `-p/--project` option. [#2126](https://github.com/pdm-project/pdm/issues/2126)
### Bug Fixes
- Fix the comparison of the candidate keys in the lockfile. [#2120](https://github.com/pdm-project/pdm/issues/2120)
- Don't update `pyproject.toml` if both `--unconstrained` and `--dry-run` are passed to `pdm update`. [#2125](https://github.com/pdm-project/pdm/issues/2125)
- Overwrite the `build-system` table when importing from other package manager. [#2126](https://github.com/pdm-project/pdm/issues/2126)
- Skip sources with empty URL when merging sources. [#2130](https://github.com/pdm-project/pdm/issues/2130)
- Fix the invalid requirement converted from poetry metadata. [#2133](https://github.com/pdm-project/pdm/issues/2133)
### Dependencies
- Update `unearth` to 0.10.0 [#2113](https://github.com/pdm-project/pdm/issues/2113)
Release v2.8.0 (2023-07-15)
---------------------------
### Features & Improvements
- Support target python with other architectures. [#2078](https://github.com/pdm-project/pdm/issues/2078)
- Display the help information when running pdm directly. [#2081](https://github.com/pdm-project/pdm/issues/2081)
- Allow to change the python providers from the config. Support finding pythons from Rye installation location with the new findpython. [#2099](https://github.com/pdm-project/pdm/issues/2099)
- Option to save static URLs in the lockfile. By default only filenames are saved. [#2101](https://github.com/pdm-project/pdm/issues/2101)
### Bug Fixes
- Fix a bug that egg-info directories are not removed completely, leading to incomplete distribution. [#2027](https://github.com/pdm-project/pdm/issues/2027)
- Skip distributions with wrong package meta information and duplicate path. [#2075](https://github.com/pdm-project/pdm/issues/2075)
- Avoid mistakenly passing command-line arguments while testing. [#2083](https://github.com/pdm-project/pdm/issues/2083)
- Fix a bug that lockfile groups are overwritten when running locking in a preceding step of `pdm install`. [#2086](https://github.com/pdm-project/pdm/issues/2086)
- Tolerate and actually ignore the local versions in version specifiers. [#2102](https://github.com/pdm-project/pdm/issues/2102)
- Fix a bug that shared cache cannot support overlapping namespace packages. [#2105](https://github.com/pdm-project/pdm/issues/2105)
### Documentation
- Add notes about using custom venv path. [#2096](https://github.com/pdm-project/pdm/issues/2096)
Release v2.8.0a2 (2023-06-30)
-----------------------------
### Bug Fixes
- Fix a bug that dependencies can't be updated when the table is separated by another table. [#2056](https://github.com/pdm-project/pdm/issues/2056)
- Fix a bug that `*_lock` hooks are always emitted with dry_run=True in `pdm update`. [#2060](https://github.com/pdm-project/pdm/issues/2060)
- Fix a bug that `pdm install --plugins` can't install self. [#2062](https://github.com/pdm-project/pdm/issues/2062)
- Fix a cache collision between named requirements and url requirements. [#2064](https://github.com/pdm-project/pdm/issues/2064)
Release v2.8.0a1 (2023-06-27)
-----------------------------
### Features & Improvements
- Add support for `cookiecutter` and `copier` as project generator. [#2059](https://github.com/pdm-project/pdm/issues/2059)
Release v2.8.0a0 (2023-06-27)
-----------------------------
### Features & Improvements
- `pdm init` now accepts a template argument to initialize project from a built-in or Git template. [#2053](https://github.com/pdm-project/pdm/issues/2053)
- Replace the `DeprecationWarning` with `FutureWarning` for better exposure. [#2012](https://github.com/pdm-project/pdm/issues/2012)
- Serve `install-pdm.py` and its checksum file on the docs site. [#2026](https://github.com/pdm-project/pdm/issues/2026)
- Add new option `--edit/-e` to `pdm config` to edit the config file in default editor. [#2028](https://github.com/pdm-project/pdm/issues/2028)
- Add `--project` option to `pdm venv` to support another path as the project root. [#2042](https://github.com/pdm-project/pdm/issues/2042)
- Add support for using `truststore` as the SSL backend. This only works on Python 3.10 or newer. [#2049](https://github.com/pdm-project/pdm/issues/2049)
### Bug Fixes
- Fix the breaking change by adding the functions back to the old location with deprecation warnings. [#2013](https://github.com/pdm-project/pdm/issues/2013)
- Fix the duplicate entries in the output of `pdm self list`. [#2018](https://github.com/pdm-project/pdm/issues/2018)
- Disable hashes caching for local files. [#2019](https://github.com/pdm-project/pdm/issues/2019)
- Populate the `url` field when converting requirements from a Pipfile-style file requirement. [#2032](https://github.com/pdm-project/pdm/issues/2032)
- Fix a bug that empty source tables in configuration files causes errors when running pdm commands. [#2034](https://github.com/pdm-project/pdm/issues/2034)
- Fix a resolution conflict caused by requested yanked version also in other transitive dependencies. [#2038](https://github.com/pdm-project/pdm/issues/2038)
- Fix a bug that binary executables are corrupted when replacing shebangs. [#2045](https://github.com/pdm-project/pdm/issues/2045)
- Do not normalize the package name when uploading to PyPI. [#2057](https://github.com/pdm-project/pdm/issues/2057)
Release v2.7.4 (2023-06-13)
---------------------------
No significant changes.
Release v2.7.3 (2023-06-13)
---------------------------
### Bug Fixes
- Fix the warning of extras not found due to extra names not normalized. [#2006](https://github.com/pdm-project/pdm/issues/2006)
- Pop up a warning when the deprecated `parser` argument is passed to `BaseCommand.__init__()` method. [#2007](https://github.com/pdm-project/pdm/issues/2007)
- Fix a bug that merging settings with AoTs causing a failure. [#2011](https://github.com/pdm-project/pdm/issues/2011)
Release v2.7.2 (2023-06-12)
---------------------------
### Features & Improvements
- Add option to expand environment variables when exporting requirements. [#1997](https://github.com/pdm-project/pdm/issues/1997)
### Bug Fixes
- Case-insensitive sorting in `pdm list`. [#1973](https://github.com/pdm-project/pdm/issues/1973)
- Make a compatible cache reader to read the old cache files. [#1981](https://github.com/pdm-project/pdm/issues/1981)
- Fix a bug that `pdm init -n` doesn't respect the `--python` option. [#1984](https://github.com/pdm-project/pdm/issues/1984)
- Do not use the deprecated nested argument groups. [#1988](https://github.com/pdm-project/pdm/issues/1988)
- Fix an error parsing `setup.py` if it prints something to stdout. [#1995](https://github.com/pdm-project/pdm/issues/1995)
- Exclude yanked versions when running `install-pdm.py`. [#1996](https://github.com/pdm-project/pdm/issues/1996)
Release v2.7.1 (2023-06-06)
---------------------------
### Features & Improvements
- Switch HTTP data cache to use a split body setup, where the actual body contents are not written to disk unless changed. Previously, any changed headers would write the whole body to disk again. [#1971](https://github.com/pdm-project/pdm/issues/1971)
- Show the specific install commands for different installations when checking update. This was removed before. [#1972](https://github.com/pdm-project/pdm/issues/1972)
### Bug Fixes
- PDM ignores env vars `PDM_PYPI_USERNAME` and `PDM_PYPI_PASSWORD` when there are no defaults in config. [#1961](https://github.com/pdm-project/pdm/issues/1961)
- Guess the project name from VCS url if it is missing when importing from requirements.txt. [#1970](https://github.com/pdm-project/pdm/issues/1970)
- Correctly read the config from environment variables. [#1977](https://github.com/pdm-project/pdm/issues/1977)
Release v2.7.0 (2023-05-29)
---------------------------
### Features & Improvements
- When keyring is available, either by importing or by CLI, the credentials of repositories and PyPI indexes will be saved into it. [#1908](https://github.com/pdm-project/pdm/issues/1908)
- Add support for reading metadata from simple index directly. [#1919](https://github.com/pdm-project/pdm/issues/1919)
- Add a configuration to specify constant command arguments for every pdm invocation. [#1923](https://github.com/pdm-project/pdm/issues/1923)
- Add ability to skip SSL verification for publish repositories via `repository.custom.verify_ssl` config option as well as new command line argument of `publish` command. [#1928](https://github.com/pdm-project/pdm/issues/1928)
- Use lazy import to reduce the startup time of the CLI. [#1929](https://github.com/pdm-project/pdm/issues/1929)
- Add the local plugin scripts to `PATH` env var. [#1944](https://github.com/pdm-project/pdm/issues/1944)
### Bug Fixes
- Don't use install cache when installing build requirements to avoid race condition. [#1869](https://github.com/pdm-project/pdm/issues/1869)
- Fix a number of `ResourceWarning`s when running the test suite with warnings enabled. [#1915](https://github.com/pdm-project/pdm/issues/1915)
- Fix a bug that dev-dependencies group gets updated with the optional dependencies, causing the hash mismatch. [#1916](https://github.com/pdm-project/pdm/issues/1916)
- Fix format conversion error from Poetry when `tool.poetry.build` doesn't exist. [#1935](https://github.com/pdm-project/pdm/issues/1935)
- Add timeout when fetching .gitignore from GitHub. [#1937](https://github.com/pdm-project/pdm/issues/1937)
- Keep the variables in the URL credentials when exporting. [#1939](https://github.com/pdm-project/pdm/issues/1939)
- Convert to boolean when setting verify_ssl for custom indexes. [#1945](https://github.com/pdm-project/pdm/issues/1945)
- `pdm import` clobbers `build-system.requires` value in `pyproject.toml`. [#1948](https://github.com/pdm-project/pdm/issues/1948)
### Documentation
- Update publish.md to use run instead of runs to match GitHub Actions steps documentation [#1936](https://github.com/pdm-project/pdm/issues/1936)
- Update advanced.md to use `pdm sync` instead of `pdm install --no-lock`. [#1947](https://github.com/pdm-project/pdm/issues/1947)
Release v2.6.1 (2023-05-10)
---------------------------
### Bug Fixes
- Fix the error when publishing using trusted publisher. [#1868](https://github.com/pdm-project/pdm/issues/1868)
- Fix a bug that `PATH` env var isn't set correctly when running under non-isolation mode. [#1904](https://github.com/pdm-project/pdm/issues/1904)
Release v2.6.0 (2023-05-09)
---------------------------
### Features & Improvements
- Install project-level plugins from project config, with `tool.pdm.plugins` setting. [#1461](https://github.com/pdm-project/pdm/issues/1461)
- Added a `--json` flag to both `run` and `info` command allowing to dump scripts and infos as JSON. [#1854](https://github.com/pdm-project/pdm/issues/1854)
- Consider tasks with a name starting by an underscore (`_`) as internal tasks and hide them from the listing. [#1855](https://github.com/pdm-project/pdm/issues/1855)
- When running `pdm init -n`(non-interactive mode), a venv will be created by default. Previously, the selected Python will be used under PEP 582 mode. [#1862](https://github.com/pdm-project/pdm/issues/1862)
- Support [Trusted Publisher](https://docs.pypi.org/trusted-publishers/). [#1868](https://github.com/pdm-project/pdm/issues/1868)
- Add an ephemeral wheel cache in process for wheels built from non-static revision sources. [#1885](https://github.com/pdm-project/pdm/issues/1885)
- Allow self-referencing groups in dev-dependencies. [#1890](https://github.com/pdm-project/pdm/issues/1890)
- Add an option `--no-cross-platform` to `pdm lock` to create a non-cross-platform lockfile. [#1898](https://github.com/pdm-project/pdm/issues/1898)
### Bug Fixes
- Fix brackets in `--venv` option descriptions in zsh completion script. [#1847](https://github.com/pdm-project/pdm/issues/1847)
- The resolver doesn't take into account of the requirements for both bare `package` and `package[extra]`. [#1851](https://github.com/pdm-project/pdm/issues/1851)
- Default pypi source does not use configured pypi.password, but "<hidden>" instead. [#1856](https://github.com/pdm-project/pdm/issues/1856)
- Detect Python interpreters under the root of virtual environments. [#1866](https://github.com/pdm-project/pdm/issues/1866)
- Fix a race condition when the builder is creating a new build directory. [#1869](https://github.com/pdm-project/pdm/issues/1869)
- Raise `FileNotFoundError` if the requirement path is not found. [#1875](https://github.com/pdm-project/pdm/issues/1875)
- Fix a bug that the self package isn't uninstallable. [#1901](https://github.com/pdm-project/pdm/issues/1901)
Release v2.5.6 (2023-05-07)
---------------------------
### Bug Fixes
- Fix a double reading issue due to cachecontrol not compatible with urllib3 2.0. [#1894](https://github.com/pdm-project/pdm/issues/1894)
Release v2.5.5 (2023-05-05)
---------------------------
No significant changes.
Release v2.5.4 (2023-05-05)
---------------------------
### Bug Fixes
- Pin the urllib3 to `<2.0` to avoid incompatibility with `cachecontrol`. [#1886](https://github.com/pdm-project/pdm/issues/1886)
Release v2.5.3 (2023-04-19)
---------------------------
### Bug Fixes
- Fix the wrong argument validation for update command, where packages given with group option should be allowed. [#1836](https://github.com/pdm-project/pdm/issues/1836)
### Documentation
- Update `markdown-exec` to `1.5.0` for rendering TOC in CLI reference page. [#1836](https://github.com/pdm-project/pdm/issues/1836)
- Remove advertizing of PEP-582 from the feature highlights. Improve the anchor links for CLI reference. [#1840](https://github.com/pdm-project/pdm/issues/1840)
Release v2.5.2 (2023-04-10)
---------------------------
### Bug Fixes
- Regression(#1710): Don't crash when trying to update the shebang in a binary script [#1827](https://github.com/pdm-project/pdm/issues/1827)
- Rename the env var `PDM_USE_VENV` as `PDM_IN_VENV` for `--venv` flag as it mistakenly override another existing env var. [#1829](https://github.com/pdm-project/pdm/issues/1829)
Release v2.5.1 (2023-04-09)
---------------------------
### Bug Fixes
- Fix a bug that `pdm --pep582` raises an argument error. [#1823](https://github.com/pdm-project/pdm/issues/1823)
Release v2.5.0 (2023-04-09)
---------------------------
### Features & Improvements
- When `resolution.respect-source-order` is enabled, sources are lazily evaluated. This means that if a match is found on the first source, the remaining sources will not be requested. [#1509](https://github.com/pdm-project/pdm/issues/1509)
- New option `--venv <venv>` to run a command in the virtual environment with the given name. [#1705](https://github.com/pdm-project/pdm/issues/1705)
- Allow to prefer binary distributions when locking and installing packages, via `PDM_PREFER_BINARY` environment variable. [#1817](https://github.com/pdm-project/pdm/issues/1817)
### Bug Fixes
- Do not validate selected groups against the locked grouped when running `pdm lock`. [#1796](https://github.com/pdm-project/pdm/issues/1796)
- Avoid duplicate .pdm-python in .gitignore. [#1800](https://github.com/pdm-project/pdm/issues/1800)
- Fix a backwards compatibility issue by adding back the `environment.is_global` property. [#1814](https://github.com/pdm-project/pdm/issues/1814)
- Fix a resolution conflict when a relative path requirement resolves to the same path as another file requirement with absolute path. [#1822](https://github.com/pdm-project/pdm/issues/1822)
- Fix an error when running `pdm init -p <dir>` if the target directory is not created yet. [#1822](https://github.com/pdm-project/pdm/issues/1822)
Release v2.5.0b0 (2023-03-29)
-----------------------------
### Breaking Changes
- Switch the default build backend to `pdm-backend`. [#1684](https://github.com/pdm-project/pdm/issues/1684)
- Only lock selected groups into the lockfile. Modify other commands to honor the groups included in the lockfile. [#1704](https://github.com/pdm-project/pdm/issues/1704)
- Move the project python path to its own file, and rename the project config file as `pdm.toml` which can be committed to the VCS. [#1742](https://github.com/pdm-project/pdm/issues/1742)
- Refactor the environment package. `Environment` is renamed to `PythonLocalEnvironment` and `GlobalEnvironment` is renamed to `PythonEnvironment`. Move `pdm.models.environment` module to `pdm.environments` package. [#1791](https://github.com/pdm-project/pdm/issues/1791)
### Features & Improvements
- Add option to fail on the first install error. [#1614](https://github.com/pdm-project/pdm/issues/1614)
- Upgrade `unearth` to 0.8 to allow calling keyring from CLI. [#1653](https://github.com/pdm-project/pdm/issues/1653)
- Merge the index parameters from different configuration files. [#1667](https://github.com/pdm-project/pdm/issues/1667)
- Add new options to `venv` command to show the path or the python interpreter for a managed venv. [#1680](https://github.com/pdm-project/pdm/issues/1680)
- Write the groups of resolved dependencies to the metadata table in lockfile. [#1692](https://github.com/pdm-project/pdm/issues/1692)
- Introduce `--lib` option to `init` command to create a library project without prompting. [#1708](https://github.com/pdm-project/pdm/issues/1708)
- New command: `pdm fix` to migrate to the new PDM features. Add a hint when invoking PDM commands. [#1743](https://github.com/pdm-project/pdm/issues/1743)
- Include `.pdm-python` in project root `.gitignore` when running `pdm init`. [#1749](https://github.com/pdm-project/pdm/issues/1749)
- Allow to ignore the activated venv with `PDM_IGNORE_ACTIVE_VENV` env var. [#1782](https://github.com/pdm-project/pdm/issues/1782)
- Add a signal `pre_invoke` to emit before any command is invoked. [#1792](https://github.com/pdm-project/pdm/issues/1792)
### Bug Fixes
- Fix a bug that install warning prints to terminal under non-verbose mode. [#1635](https://github.com/pdm-project/pdm/issues/1635)
- Fix the random failure of `pdm export` due to non-deterministic order of group iteration. [#1786](https://github.com/pdm-project/pdm/issues/1786)
- Show the actual version when running `pdm show --version` [#1788](https://github.com/pdm-project/pdm/issues/1788)
### Documentation
- Restructure the documentation. [#1687](https://github.com/pdm-project/pdm/issues/1687)
### Dependencies
- Update `installer` to `0.7.0` and emit a warning if the RECORD validation fails. [#1784](https://github.com/pdm-project/pdm/issues/1784)
Release v2.4.9 (2023-03-16)
---------------------------
### Bug Fixes
- Fix a bug of synchronization of not considering the revision of VCS requirement in comparison. [#1762](https://github.com/pdm-project/pdm/issues/1762)
- Improve the error message when parsing an invalid requirement string. [#1765](https://github.com/pdm-project/pdm/issues/1765)
- Fix a bug that `pdm export` output doesn't include the extras of the dependencies. [#1767](https://github.com/pdm-project/pdm/issues/1767)
Release v2.4.8 (2023-03-09)
---------------------------
### Bug Fixes
- Fix the resolution order to prefer the packages causing the conflict.
This can make the resolution reach a solution faster. [#1752](https://github.com/pdm-project/pdm/issues/1752)
- Fix a bug that embedded credentials in URL are not respected for the default source. [#1757](https://github.com/pdm-project/pdm/issues/1757)
Release v2.4.7 (2023-03-02)
---------------------------
### Bug Fixes
- Abort if lockfile isn't generated when executing `pdm export`. [#1730](https://github.com/pdm-project/pdm/issues/1730)
- Ignore `venv.prompt` configuration when using `conda` as the backend. [#1734](https://github.com/pdm-project/pdm/issues/1734)
- Fix a bug of finding local packages in the parent folder when it exists in the current folder. [#1736](https://github.com/pdm-project/pdm/issues/1736)
- Ensure UTF-8 encoding when generating README.md. [#1739](https://github.com/pdm-project/pdm/issues/1739)
- Fix a bug of show command not showing metadata of the current project. [#1740](https://github.com/pdm-project/pdm/issues/1740)
- Replace `.` with `-` when normalizing package name. [#1745](https://github.com/pdm-project/pdm/issues/1745)
### Documentation
- Support using `pdm venv activate` without specifying `env_name` to activate in project venv created by conda [#1735](https://github.com/pdm-project/pdm/issues/1735)
Release v2.4.6 (2023-02-20)
---------------------------
### Bug Fixes
- Fix a resolution failure when the project has cascading relative path dependencies. [#1702](https://github.com/pdm-project/pdm/issues/1702)
- Don't crash when trying to update the shebang in a binary script. [#1709](https://github.com/pdm-project/pdm/issues/1709)
- Handle the legacy specifiers that is unable to parse with packaging>22.0. [#1719](https://github.com/pdm-project/pdm/issues/1719)
- Fix the setup.py parser to ignore the expressions unable to parse as a string. This is safe for initializing a requirement. [#1720](https://github.com/pdm-project/pdm/issues/1720)
- Fix a bug converting from flit metadata when the source file can't be found. [#1726](https://github.com/pdm-project/pdm/issues/1726)
### Documentation
- Add config example for Emacs using eglot + pyright [#1721](https://github.com/pdm-project/pdm/issues/1721)
### Miscellany
- Use `ruff` as the linter. [#1715](https://github.com/pdm-project/pdm/issues/1715)
- Document installation via `asdf`. [#1725](https://github.com/pdm-project/pdm/issues/1725)
Release v2.4.5 (2023-02-10)
---------------------------
### Bug Fixes
- Fix a bug that built wheels are prioritized over source distributions with higher version number. [#1698](https://github.com/pdm-project/pdm/issues/1698)
Release v2.4.4 (2023-02-10)
---------------------------
### Features & Improvements
- Add more intuitive error message when the `requires-python` doesn't work for all dependencies. [#1690](https://github.com/pdm-project/pdm/issues/1690)
### Bug Fixes
- Prefer built distributions when finding packages for metadata extraction. [#1535](https://github.com/pdm-project/pdm/issues/1535)
Release v2.4.3 (2023-02-06)
---------------------------
### Features & Improvements
- Allow creating venv in project forcibly if it already exists. [#1666](https://github.com/pdm-project/pdm/issues/1666)
- Always ignore remembered selection in pdm init. [#1672](https://github.com/pdm-project/pdm/issues/1672)
### Bug Fixes
- Fix the fallback build backend to `pdm-pep517` instead of `setuptools`. [#1658](https://github.com/pdm-project/pdm/issues/1658)
- Eliminate the deprecation warnings from `importlib.resources`. [#1660](https://github.com/pdm-project/pdm/issues/1660)
- Don't crash when failed to get the latest version of PDM for checking update. [#1663](https://github.com/pdm-project/pdm/issues/1663)
- Fix the priorities of importable formats to make sure the correct format is used. [#1669](https://github.com/pdm-project/pdm/issues/1669)
- Import editable requirements into dev dependencies. [#1674](https://github.com/pdm-project/pdm/issues/1674)
Release v2.4.2 (2023-01-31)
---------------------------
### Bug Fixes
- Skip some tests on packaging < 22. [#1649](https://github.com/pdm-project/pdm/issues/1649)
- Fix a bug that sources from the project config are not loaded. [#1651](https://github.com/pdm-project/pdm/issues/1651)
- Set VIRTUAL_ENV in `pdm run`. [#1652](https://github.com/pdm-project/pdm/issues/1652)
Release v2.4.1 (2023-01-28)
---------------------------
### Features & Improvements
- Add proper display for the extra pypi sources in `pdm config`. [#1622](https://github.com/pdm-project/pdm/issues/1622)
- Support running python scripts without prefixing with `python`. [#1626](https://github.com/pdm-project/pdm/issues/1626)
### Bug Fixes
- Ignore the python requirement for overridden packages. [#1575](https://github.com/pdm-project/pdm/issues/1575)
- Fix the wildcards in requirement specifiers to make it pass the new parser of `packaging>=22`. [#1619](https://github.com/pdm-project/pdm/issues/1619)
- Add the missing `subdirectory` attribute to the lockfile entry. [#1630](https://github.com/pdm-project/pdm/issues/1630)
- Fix a bug that VCS locks don't update when the rev part changes. [#1640](https://github.com/pdm-project/pdm/issues/1640)
- Redirect the spinner output to stderr. [#1646](https://github.com/pdm-project/pdm/issues/1646)
- Ensure the destination directory exists before building the packages. [#1647](https://github.com/pdm-project/pdm/issues/1647)
Release v2.4.0 (2023-01-12)
---------------------------
### Features & Improvements
- Support multiple PyPI indexes in the configuration. They will be tried after the sources in `pyproject.toml`. [#1310](https://github.com/pdm-project/pdm/issues/1310)
- Accept yanked versions when the requirement version is pinned. [#1575](https://github.com/pdm-project/pdm/issues/1575)
- Expose PDM fixtures as a `pytest` plugin `pdm.pytest` for plugin developers. [#1594](https://github.com/pdm-project/pdm/issues/1594)
- Show message in the status when fetching package hashes.
Fetch hashes from the JSON API response as well. [#1609](https://github.com/pdm-project/pdm/issues/1609)
- Mark `pdm.lock` with an `@generated` comment. [#1611](https://github.com/pdm-project/pdm/issues/1611)
### Bug Fixes
- Exclude site-packages for symlinks of the python interpreter as well. [#1598](https://github.com/pdm-project/pdm/issues/1598)
- Fix a bug that error output can't be decoded correctly on Windows. [#1602](https://github.com/pdm-project/pdm/issues/1602)
Release v2.3.4 (2022-12-27)
---------------------------
### Features & Improvements
- Detect PDM inside a zipapp and disable some functions. [#1578](https://github.com/pdm-project/pdm/issues/1578)
### Bug Fixes
- Don't write `sitecustomize` to the home directory if it exists in the filesystem(not packed in a zipapp). [#1572](https://github.com/pdm-project/pdm/issues/1572)
- Fix a bug that a directory is incorrectly marked as to be deleted when it contains symlinks. [#1580](https://github.com/pdm-project/pdm/issues/1580)
Release v2.3.3 (2022-12-15)
---------------------------
### Bug Fixes
- Allow relative paths in `build-system.requires`, since `build` and `hatch` both support it. Be aware it is not allowed in the standard. [#1560](https://github.com/pdm-project/pdm/issues/1560)
- Strip the local part when building a specifier for comparison with the package version. This is not permitted by PEP 508 as implemented by `packaging 22.0`. [#1562](https://github.com/pdm-project/pdm/issues/1562)
- Update the version for check_update after self update [#1563](https://github.com/pdm-project/pdm/issues/1563)
- Replace the `__file__` usages with `importlib.resources`, to make PDM usable in a zipapp. [#1567](https://github.com/pdm-project/pdm/issues/1567)
- Fix the matching problem of packages in the lockfile. [#1569](https://github.com/pdm-project/pdm/issues/1569)
### Dependencies
- Exclude `package==22.0` from the dependencies to avoid some breakages to the end users. [#1568](https://github.com/pdm-project/pdm/issues/1568)
Release v2.3.2 (2022-12-08)
---------------------------
### Bug Fixes
- Fix an installation failure when the RECORD file contains commas in the file path. [#1010](https://github.com/pdm-project/pdm/issues/1010)
- Fallback to `pdm.pep517` as the metadata transformer for unknown custom build backends. [#1546](https://github.com/pdm-project/pdm/issues/1546)
- Fix a bug that Ctrl + C kills the python interactive session instead of clearing the current line. [#1547](https://github.com/pdm-project/pdm/issues/1547)
- Fix a bug with egg segment for local dependency [#1552](https://github.com/pdm-project/pdm/issues/1552)
### Dependencies
- Update `installer` to `0.6.0`. [#1550](https://github.com/pdm-project/pdm/issues/1550)
- Update minimum version of `unearth` to `0.6.3` and test against `packaging==22.0`. [#1555](https://github.com/pdm-project/pdm/issues/1555)
Release v2.3.1 (2022-12-05)
---------------------------
### Bug Fixes
- Fix a resolution loop issue when the current project depends on itself and it uses the dynamic version from SCM. [#1541](https://github.com/pdm-project/pdm/issues/1541)
- Don't give duplicate results when specifying a relative path for `pdm use`. [#1542](https://github.com/pdm-project/pdm/issues/1542)
Release v2.3.0 (2022-12-02)
---------------------------
### Features & Improvements
- Beautify the error message of build errors. Default to showing the last 10 lines of the build output. [#1491](https://github.com/pdm-project/pdm/issues/1491)
- Rename the `tool.pdm.overrides` table to `tool.pdm.resolution.overrides`. The old name is deprecated at the same time. [#1503](https://github.com/pdm-project/pdm/issues/1503)
- Add backend selection and `--backend` option to `pdm init` command, users can choose a favorite backend from `setuptools`, `flit`, `hatchling` and `pdm-pep517`(default), since they all support PEP 621 standards. [#1504](https://github.com/pdm-project/pdm/issues/1504)
- Allows specifying the insertion position of user provided arguments in scripts with the `{args[:default]}` placeholder. [#1507](https://github.com/pdm-project/pdm/issues/1507)
### Bug Fixes
- The local package is now treated specially during installation and locking. This means it will no longer be included in the lockfile, and should never be installed twice even when using nested extras. This will ensure the lockdown stays relevant when the version changes. [#1481](https://github.com/pdm-project/pdm/issues/1481)
- Fix the version diff algorithm of installed packages to consider local versions as compatible. [#1497](https://github.com/pdm-project/pdm/issues/1497)
- Fix the confusing message when detecting a Python interpreter under `python.use_venv=False` [#1508](https://github.com/pdm-project/pdm/issues/1508)
- Fix the test failure with the latest `findpython` installed. [#1516](https://github.com/pdm-project/pdm/issues/1516)
- Fix the module missing error of pywin32 in a virtualenv with `install.cache` set to `true` and caching method is `pth`. [#863](https://github.com/pdm-project/pdm/issues/863)
### Dependencies
- Drop the dependency `pdm-pep517`. [#1504](https://github.com/pdm-project/pdm/issues/1504)
- Replace `pep517` with `pyproject-hooks` because of the rename. [#1528](https://github.com/pdm-project/pdm/issues/1528)
### Removals and Deprecations
- Remove the support for exporting the project file to a `setup.py` format, users are encouraged to migrate to the PEP 621 metadata. [#1504](https://github.com/pdm-project/pdm/issues/1504)
Release v2.2.1 (2022-11-03)
---------------------------
### Features & Improvements
- Make `sitecustomize.py` respect the `PDM_PROJECT_MAX_DEPTH` environment variable [#1471](https://github.com/pdm-project/pdm/issues/1471)
### Bug Fixes
- Fix the comparison of `python_version` in the environment marker. When the version contains only one digit, the result was incorrect. [#1484](https://github.com/pdm-project/pdm/issues/1484)
Release v2.2.0 (2022-10-31)
---------------------------
### Features & Improvements
- Add `venv.prompt` configuration to allow customizing prompt when a virtualenv is activated [#1332](https://github.com/pdm-project/pdm/issues/1332)
- Allow the use of custom CA certificates per publish repository using `ca_certs` or from the command line via `pdm publish --ca-certs <path> ...`. [#1392](https://github.com/pdm-project/pdm/issues/1392)
- Rename the `plugin` command to `self`, and it can not only manage plugins but also all dependencies. Add a subcommand `self update` to update PDM itself. [#1406](https://github.com/pdm-project/pdm/issues/1406)
- Allow `pdm init` to receive a Python path or version via `--python` option. [#1412](https://github.com/pdm-project/pdm/issues/1412)
- Add a default value for `requires-python` when importing from other formats. [#1426](https://github.com/pdm-project/pdm/issues/1426)
- Use `pdm` instead of `pip` to resolve and install build requirements. So that PDM configurations can control the process. [#1429](https://github.com/pdm-project/pdm/issues/1429)
- Customizable color theme via `pdm config` command. [#1450](https://github.com/pdm-project/pdm/issues/1450)
- A new `pdm lock --check` flag to validate whether the lock is up to date. [#1459](https://github.com/pdm-project/pdm/issues/1459)
- Add both option and config item to ship `pip` when creating a new venv. [#1463](https://github.com/pdm-project/pdm/issues/1463)
- Issue warning and skip the requirement if it has the same name as the current project. [#1466](https://github.com/pdm-project/pdm/issues/1466)
- Enhance the `pdm list` command with new formats: `--csv,--markdown` and add options `--fields,--sort` to control the output contents. Users can also include `licenses` in the `--fields` option to display the package licenses. [#1469](https://github.com/pdm-project/pdm/issues/1469)
- A new pre-commit hook to run `pdm lock --check` in pre-commit. [#1471](https://github.com/pdm-project/pdm/issues/1471)
### Bug Fixes
- Fix the issue that relative paths don't work well with `--project` argument. [#1220](https://github.com/pdm-project/pdm/issues/1220)
- It is now possible to refer to a package from outside the project with relative paths in dependencies. [#1381](https://github.com/pdm-project/pdm/issues/1381)
- Ensure `pypi.[ca,client]_cert[s]` config items are passed to distribution builder install steps to allow for custom PyPI index sources with self signed certificates. [#1396](https://github.com/pdm-project/pdm/issues/1396)
- Fix a crash issue when depending on editable packages with extras. [#1401](https://github.com/pdm-project/pdm/issues/1401)
- Do not save the python path when using non-interactive mode in `pdm init`. [#1410](https://github.com/pdm-project/pdm/issues/1410)
- Fix the matching of `python*` command in `pdm run`. [#1414](https://github.com/pdm-project/pdm/issues/1414)
- Show the Python path, instead of the real executable, in the Python selection menu. [#1418](https://github.com/pdm-project/pdm/issues/1418)
- Fix the HTTP client of package publishment to prompt for password and read PDM configurations correctly. [#1430](https://github.com/pdm-project/pdm/issues/1430)
- Ignore the unknown fields when constructing a requirement object. [#1445](https://github.com/pdm-project/pdm/issues/1445)
- Fix a bug of unrelated candidates being fetched if the requirement is matching wildcard versions(e.g. `==1.*`). [#1465](https://github.com/pdm-project/pdm/issues/1465)
- Use `importlib-metadata` from PyPI for Python < 3.10. [#1467](https://github.com/pdm-project/pdm/issues/1467)
### Documentation
- Clarify the difference between a library and an application. Update the guide of multi-stage docker build. [#1371](https://github.com/pdm-project/pdm/issues/1371)
### Removals and Deprecations
- Remove all top-level imports, users should import from the submodules instead. [#1404](https://github.com/pdm-project/pdm/issues/1404)
- Remove the usages of old config names deprecated since 2.0. [#1422](https://github.com/pdm-project/pdm/issues/1422)
- Remove the deprecated color functions, use [rich's console markup](https://rich.readthedocs.io/en/latest/markup.html) instead. [#1452](https://github.com/pdm-project/pdm/issues/1452)
Release v2.1.5 (2022-10-05)
---------------------------
### Bug Fixes
- Ensure `pypi.[ca,client]_cert[s]` config items are passed to distribution builder install steps to allow for custom PyPI index sources with self signed certificates. [#1396](https://github.com/pdm-project/pdm/issues/1396)
- Fix a crash issue when depending on editable packages with extras. [#1401](https://github.com/pdm-project/pdm/issues/1401)
- Do not save the python path when using non-interactive mode in `pdm init`. [#1410](https://github.com/pdm-project/pdm/issues/1410)
- Restrict importlib-metadata (<5.0.0) for Python <3.8 [#1411](https://github.com/pdm-project/pdm/issues/1411)
Release v2.1.4 (2022-09-17)
---------------------------
### Bug Fixes
- Fix a lock failure when depending on self with URL requirements. [#1347](https://github.com/pdm-project/pdm/issues/1347)
- Ensure list to concatenate args for composite scripts. [#1359](https://github.com/pdm-project/pdm/issues/1359)
- Fix an error in `pdm lock --refresh` if some packages has URLs. [#1361](https://github.com/pdm-project/pdm/issues/1361)
- Fix unnecessary package downloads and VCS clones for certain commands. [#1370](https://github.com/pdm-project/pdm/issues/1370)
- Fix a conversion error when converting a list of conditional dependencies from a Poetry format. [#1383](https://github.com/pdm-project/pdm/issues/1383)
### Documentation
- Adds a section to the docs on how to correctly work with PDM and version control systems. [#1364](https://github.com/pdm-project/pdm/issues/1364)
Release v2.1.3 (2022-08-30)
---------------------------
### Features & Improvements
- When adding a package to (or removing from) a group, enhance the formatting of the group name in the printed message. [#1329](https://github.com/pdm-project/pdm/issues/1329)
### Bug Fixes
- Fix a bug of missing hashes for packages with `file://` links the first time they are added. [#1325](https://github.com/pdm-project/pdm/issues/1325)
- Ignore invalid values of `data-requires-python` when parsing package links. [#1334](https://github.com/pdm-project/pdm/issues/1334)
- Leave an incomplete project metadata if PDM fails to parse the project files, but emit a warning. [#1337](https://github.com/pdm-project/pdm/issues/1337)
- Fix the bug that `editables` package isn't installed for self package. [#1344](https://github.com/pdm-project/pdm/issues/1344)
- Fix a decoding error for non-ASCII characters in package description when publishing it. [#1345](https://github.com/pdm-project/pdm/issues/1345)
### Documentation
- Clarify documentation explaining `setup-script`, `run-setuptools`, and `is-purelib`. [#1327](https://github.com/pdm-project/pdm/issues/1327)
Release v2.1.2 (2022-08-15)
---------------------------
### Bug Fixes
- Fix a bug that dependencies from different versions of the same package override each other. [#1307](https://github.com/pdm-project/pdm/issues/1307)
- Forward SIGTERM to child processes in `pdm run`. [#1312](https://github.com/pdm-project/pdm/issues/1312)
- Fix errors when running on FIPS 140-2 enabled systems using Python 3.9 and newer. [#1313](https://github.com/pdm-project/pdm/issues/1313)
- Fix the build failure when the subprocess outputs with non-UTF8 characters. [#1319](https://github.com/pdm-project/pdm/issues/1319)
- Delay the trigger of `post_lock` for `add` and `update` operations, to ensure the `pyproject.toml` is updated before the hook is run. [#1320](https://github.com/pdm-project/pdm/issues/1320)
Release v2.1.1 (2022-08-05)
---------------------------
### Features & Improvements
- Add a env_file.override option that allows the user to specify that
the env_file should override any existing environment variables. This
is not the default as the environment the code runs it should take
precedence. [#1299](https://github.com/pdm-project/pdm/issues/1299)
### Bug Fixes
- Fix a bug that unnamed requirements can't override the old ones in either `add` or `update` command. [#1287](https://github.com/pdm-project/pdm/issues/1287)
- Support mutual TLS to private repositories via pypi.client_cert and pypi.client_key config options. [#1290](https://github.com/pdm-project/pdm/issues/1290)
- Set a minimum version for the `packaging` dependency to ensure that `packaging.utils.parse_wheel_filename` is available. [#1293](https://github.com/pdm-project/pdm/issues/1293)
- Fix a bug that checking for PDM update creates a venv. [#1301](https://github.com/pdm-project/pdm/issues/1301)
- Prefer compatible packages when fetching metadata. [#1302](https://github.com/pdm-project/pdm/issues/1302)
Release v2.1.0 (2022-07-29)
---------------------------
### Features & Improvements
- Allow the use of custom CA certificates using the `pypi.ca_certs` config entry. [#1240](https://github.com/pdm-project/pdm/issues/1240)
- Add `pdm export` to available pre-commit hooks. [#1279](https://github.com/pdm-project/pdm/issues/1279)
### Bug Fixes
- Skip incompatible requirements when installing build dependencies. [#1264](https://github.com/pdm-project/pdm/issues/1264)
- Fix a crash when pdm tries to publish a package with non-ASCII characters in the metadata. [#1270](https://github.com/pdm-project/pdm/issues/1270)
- Try to read the lock file even if the lock version is incompatible. [#1273](https://github.com/pdm-project/pdm/issues/1273)
- For packages that are only available as source distribution, the `summary` field in `pdm.lock` contains the `description` from the package's `pyproject.toml`. [#1274](https://github.com/pdm-project/pdm/issues/1274)
- Do not crash when calling `pdm show` for a package that is only available as source distribution. [#1276](https://github.com/pdm-project/pdm/issues/1276)
- Fix a bug that completion scripts are interpreted as rich markups. [#1283](https://github.com/pdm-project/pdm/issues/1283)
### Dependencies
- Remove the dependency of `pip`. [#1268](https://github.com/pdm-project/pdm/issues/1268)
### Removals and Deprecations
- Deprecate the top-level imports from `pdm` module, it will be removed in the future. [#1282](https://github.com/pdm-project/pdm/issues/1282)
Release v2.0.3 (2022-07-22)
---------------------------
### Bug Fixes
- Support Conda environments when detecting the project environment. [#1253](https://github.com/pdm-project/pdm/issues/1253)
- Fix the interpreter resolution to first try `python` executable in the `PATH`. [#1255](https://github.com/pdm-project/pdm/issues/1255)
- Stabilize sorting of URLs in `metadata.files` in `pdm.lock`. [#1256](https://github.com/pdm-project/pdm/issues/1256)
- Don't expand credentials in the file URLs in the `[metadata.files]` table of the lock file. [#1259](https://github.com/pdm-project/pdm/issues/1259)
Release v2.0.2 (2022-07-20)
---------------------------
### Features & Improvements
- `env_file` variables no longer override existing environment variables. [#1235](https://github.com/pdm-project/pdm/issues/1235)
- Support referencing other optional groups in optional-dependencies with `<this_package_name>[group1, group2]` [#1241](https://github.com/pdm-project/pdm/issues/1241)
### Bug Fixes
- Respect `requires-python` when creating the default venv. [#1237](https://github.com/pdm-project/pdm/issues/1237)
Release v2.0.1 (2022-07-17)
---------------------------
### Bug Fixes
- Write lockfile before calling 'post_lock' hook [#1224](https://github.com/pdm-project/pdm/issues/1224)
- Suppress errors when cache dir isn't accessible. [#1226](https://github.com/pdm-project/pdm/issues/1226)
- Don't save python path for venv commands. [#1230](https://github.com/pdm-project/pdm/issues/1230)
Release v2.0.0 (2022-07-15)
---------------------------
### Bug Fixes
- Fix a bug that the running env overrides the PEP 582 `PYTHONPATH`. [#1211](https://github.com/pdm-project/pdm/issues/1211)
- Add [`pwsh`](https://github.com/PowerShell/PowerShell) as an alias of `powershell` for shell completion. [#1216](https://github.com/pdm-project/pdm/issues/1216)
- Fixed a bug with `zsh` completion regarding `--pep582` flag. [#1218](https://github.com/pdm-project/pdm/issues/1218)
- Fix a bug of requirement checking under non-isolated mode. [#1219](https://github.com/pdm-project/pdm/issues/1219)
- Fix a bug when removing packages, TOML document might become invalid. [#1221](https://github.com/pdm-project/pdm/issues/1221)
Release v2.0.0b2 (2022-07-08)
-----------------------------
### Breaking Changes
- Store file URLs instead of filenames in the lock file, bump lock version to `4.0`. [#1203](https://github.com/pdm-project/pdm/issues/1203)
### Features & Improvements
- Read site-wide configuration, which serves as the lowest-priority layer.
This layer will be read-only in the CLI. [#1200](https://github.com/pdm-project/pdm/issues/1200)
- Get package links from the urls stored in the lock file. [#1204](https://github.com/pdm-project/pdm/issues/1204)
### Bug Fixes
- Fix a bug that the host pip(installed with pdm) may not be compatible with the project python. [#1196](https://github.com/pdm-project/pdm/issues/1196)
- Update `unearth` to fix a bug that install links with weak hashes are skipped. This often happens on self-hosted PyPI servers. [#1202](https://github.com/pdm-project/pdm/issues/1202)
Release v2.0.0b1 (2022-07-02)
-----------------------------
### Features & Improvements
- Integrate `pdm venv` commands into the main program. Make PEP 582 an opt-in feature. [#1162](https://github.com/pdm-project/pdm/issues/1162)
- Add config `global_project.fallback_verbose` defaulting to `True`. When set to `False` disables message `Project is not found, fallback to the global project` [#1188](https://github.com/pdm-project/pdm/issues/1188)
- Add `--only-keep` option to `pdm sync` to keep only selected packages. Originally requested at #398. [#1191](https://github.com/pdm-project/pdm/issues/1191)
### Bug Fixes
- Fix a bug that requirement extras and underlying are resolved to the different version [#1173](https://github.com/pdm-project/pdm/issues/1173)
- Update `unearth` to `0.4.1` to skip the wheels with invalid version parts. [#1178](https://github.com/pdm-project/pdm/issues/1178)
- Fix reading `PDM_RESOLVE_MAX_ROUNDS` environment variable (was spelled `…ROUDNS` before). [#1180](https://github.com/pdm-project/pdm/issues/1180)
- Deduplicate the list of found Python versions. [#1182](https://github.com/pdm-project/pdm/issues/1182)
- Use the normal stream handler for logging, to fix some display issues under non-tty environments. [#1184](https://github.com/pdm-project/pdm/issues/1184)
### Removals and Deprecations
- Remove the useless `--no-clean` option from `pdm sync` command. [#1191](https://github.com/pdm-project/pdm/issues/1191)
Release v2.0.0a1 (2022-06-29)
-----------------------------
### Breaking Changes
- Editable dependencies in the `[project]` table is not allowed, according to PEP 621. They are however still allowed in the `[tool.pdm.dev-dependencies]` table. PDM will emit a warning when it finds editable dependencies in the `[project]` table, or will abort when you try to add them into the `[project]` table via CLI. [#1083](https://github.com/pdm-project/pdm/issues/1083)
- Now the paths to the global configurations and global project are calculated according to platform standards. [#1161](https://github.com/pdm-project/pdm/issues/1161)
### Features & Improvements
- Add support for importing from a `setup.py` project. [#1062](https://github.com/pdm-project/pdm/issues/1062)
- Switch the UI backend to `rich`. [#1091](https://github.com/pdm-project/pdm/issues/1091)
- Improved the terminal UI and logging. Disable live progress under verbose mode. The logger levels can be controlled by the `-v` option. [#1096](https://github.com/pdm-project/pdm/issues/1096)
- Use `unearth` to replace `pip`'s `PackageFinder` and related data models. PDM no longer relies on `pip` internals, which are unstable across updates. [#1096](https://github.com/pdm-project/pdm/issues/1096)
- Lazily load the candidates returned by `find_matches()` to speed up the resolution. [#1098](https://github.com/pdm-project/pdm/issues/1098)
- Add a new command `publish` to PDM since it is required for so many people and it will make the workflow easier. [#1107](https://github.com/pdm-project/pdm/issues/1107)
- Add a `composite` script kind allowing to run multiple defined scripts in a single command as well as reusing scripts but overriding `env` or `env_file`. [#1117](https://github.com/pdm-project/pdm/issues/1117)
- Add a new execution option `--skip` to opt-out some scripts and hooks from any execution (both scripts and PDM commands). [#1127](https://github.com/pdm-project/pdm/issues/1127)
- Add the `pre/post_publish`, `pre/post_run` and `pre/post_script` hooks as well as an extensive lifecycle and hooks documentation. [#1147](https://github.com/pdm-project/pdm/issues/1147)
- Shorter scripts listing, especially for multilines and composite scripts. [#1151](https://github.com/pdm-project/pdm/issues/1151)
- Build configurations have been moved to `[tool.pdm.build]`, according to `pdm-pep517 1.0.0`. At the same time, warnings will be shown against old usages. [#1153](https://github.com/pdm-project/pdm/issues/1153)
- Improve the lock speed by parallelizing the hash fetching. [#1154](https://github.com/pdm-project/pdm/issues/1154)
- Retrieve the candidate metadata by parsing the `pyproject.toml` rather than building it. [#1156](https://github.com/pdm-project/pdm/issues/1156)
- Update the format converters to support the new `[tool.pdm.build]` table. [#1157](https://github.com/pdm-project/pdm/issues/1157)
- Scripts are now available as root command if they don't conflict with any builtin or plugin-contributed command. [#1159](https://github.com/pdm-project/pdm/issues/1159)
- Add a `post_use` hook triggered after successfully switching Python version. [#1163](https://github.com/pdm-project/pdm/issues/1163)
- Add project configuration `respect-source-order` under `[tool.pdm.resolution]` to respect the source order in the `pyproject.toml` file. Packages will be returned by source earlier in the order or later ones if not found. [#593](https://github.com/pdm-project/pdm/issues/593)
### Bug Fixes
- Fix a bug that candidates with local part in the version can't be found and installed correctly. [#1093](https://github.com/pdm-project/pdm/issues/1093)
### Dependencies
- Prefer `tomllib` on Python 3.11 [#1072](https://github.com/pdm-project/pdm/issues/1072)
- Drop the vendored libraries `click`, `halo`, `colorama` and `log_symbols`. PDM has no vendors now. [#1091](https://github.com/pdm-project/pdm/issues/1091)
- Update dependency version `pdm-pep517` to `1.0.0`. [#1153](https://github.com/pdm-project/pdm/issues/1153)
### Removals and Deprecations
- PDM legacy metadata format(from `pdm 0.x`) is no longer supported. [#1157](https://github.com/pdm-project/pdm/issues/1157)
### Miscellany
- Provide a `tox.ini` file for easier local testing against all Python versions. [#1160](https://github.com/pdm-project/pdm/issues/1160)
Release v1.15.4 (2022-06-28)
----------------------------
### Bug Fixes
- Revert #1106: Do not use `venv` scheme for `prefix` kind install scheme. [#1158](https://github.com/pdm-project/pdm/issues/1158)
- Fix a bug when updating a package with extra requirements, the package version doesn't get updated correctly. [#1166](https://github.com/pdm-project/pdm/issues/1166)
### Miscellany
- Add additional installation option via [asdf-pdm](https://github.com/1oglop1/asdf-pdm).
Add `skip-add-to-path` option to installer in order to prevent changing `PATH`.
Replace `bin` variable name with `bin_dir`. [#1145](https://github.com/pdm-project/pdm/issues/1145)
Release v1.15.3 (2022-06-14)
----------------------------
### Bug Fixes
- Fix a defect in the resolution preferences that causes an infinite resolution loop. [#1119](https://github.com/pdm-project/pdm/issues/1119)
- Update the poetry importer to support the new `[tool.poetry.build]` config table. [#1131](https://github.com/pdm-project/pdm/issues/1131)
### Improved Documentation
- Add support for multiple versions of documentations. [#1126](https://github.com/pdm-project/pdm/issues/1126)
Release v1.15.2 (2022-06-06)
----------------------------
### Bug Fixes
- Fix bug where SIGINT is sent to the main `pdm` process and not to the process actually being run. [#1095](https://github.com/pdm-project/pdm/issues/1095)
- Fix a bug due to the build backend fallback, which causes different versions of the same requirement to exist in the build environment, making the building unstable depending on which version being used. [#1099](https://github.com/pdm-project/pdm/issues/1099)
- Don't include the `version` in the cache key of the locked candidates if they are from a URL requirement. [#1099](https://github.com/pdm-project/pdm/issues/1099)
- Fix a bug where dependencies with `requires-python` pre-release versions caused `pdm update` to fail with `InvalidPyVersion`. [#1111](https://github.com/pdm-project/pdm/issues/1111)
Release v1.15.1 (2022-06-02)
----------------------------
### Bug Fixes
- Fix a bug that dependencies are missing from the dep graph when they are depended by a requirement with extras. [#1097](https://github.com/pdm-project/pdm/issues/1097)
- Give a default version if the version is dynamic in `setup.cfg` or `setup.py`. [#1101](https://github.com/pdm-project/pdm/issues/1101)
- Fix a bug that the hashes for file URLs are not included in the lock file. [#1103](https://github.com/pdm-project/pdm/issues/1103)
- Fix a bug that package versions are updated even when they are excluded by `pdm update` command. [#1104](https://github.com/pdm-project/pdm/issues/1104)
- Prefer `venv` install scheme when available. This scheme is more stable than `posix_prefix` scheme since the latter is often patched by distributions. [#1106](https://github.com/pdm-project/pdm/issues/1106)
### Miscellany
- Move the test artifacts to a submodule. It will make it easier to package this project. [#1084](https://github.com/pdm-project/pdm/issues/1084)
Release v1.15.0 (2022-05-16)
----------------------------
### Features & Improvements
- Allow specifying lockfile other than `pdm.lock` by `--lockfile` option or `PDM_LOCKFILE` env var. [#1038](https://github.com/pdm-project/pdm/issues/1038)
### Bug Fixes
- Replace the editable entry in `pyproject.toml` when running `pdm add --no-editable <package>`. [#1050](https://github.com/pdm-project/pdm/issues/1050)
- Ensure the pip module inside venv in installation script. [#1053](https://github.com/pdm-project/pdm/issues/1053)
- Fix the py2 compatibility issue in the in-process `get_sysconfig_path.py` script. [#1056](https://github.com/pdm-project/pdm/issues/1056)
- Fix a bug that file paths in URLs are not correctly unquoted. [#1073](https://github.com/pdm-project/pdm/issues/1073)
- Fix a bug on Python 3.11 that overriding an existing command from plugins raises an error. [#1075](https://github.com/pdm-project/pdm/issues/1075)
- Replace the `${PROJECT_ROOT}` variable in the result of `export` command. [#1079](https://github.com/pdm-project/pdm/issues/1079)
### Removals and Deprecations
- Show a warning if Python 2 interpreter is being used and remove the support on 2.0. [#1082](https://github.com/pdm-project/pdm/issues/1082)
Release v1.14.1 (2022-04-21)
----------------------------
### Features & Improvements
- Ask for description when doing `pdm init` and create default README for libraries. [#1041](https://github.com/pdm-project/pdm/issues/1041)
### Bug Fixes
- Fix a bug of missing subdirectory fragment when importing from a `requirements.txt`. [#1036](https://github.com/pdm-project/pdm/issues/1036)
- Fix use_cache.json with corrupted python causes `pdm use` error. [#1039](https://github.com/pdm-project/pdm/issues/1039)
- Ignore the `optional` key when converting from Poetry's dependency entries. [#1042](https://github.com/pdm-project/pdm/issues/1042)
### Improved Documentation
- Clarify documentation on enabling PEP582 globally. [#1033](https://github.com/pdm-project/pdm/issues/1033)
Release v1.14.0 (2022-04-08)
----------------------------
### Features & Improvements
- Editable installations won't be overridden unless `--no-editable` is passed.
`pdm add --no-editable` will now override the `editable` mode of the given packages. [#1011](https://github.com/pdm-project/pdm/issues/1011)
- Re-calculate the file hashes when running `pdm lock --refresh`. [#1019](https://github.com/pdm-project/pdm/issues/1019)
### Bug Fixes
- Fix a bug that requirement with extras isn't resolved to the version as specified by the range. [#1001](https://github.com/pdm-project/pdm/issues/1001)
- Replace the `${PROJECT_ROOT}` in the output of `pdm list`. [#1004](https://github.com/pdm-project/pdm/issues/1004)
- Further fix the python path issue of macOS system installed Python. [#1023](https://github.com/pdm-project/pdm/issues/1023)
- Fix the install path issue on Python 3.10 installed from homebrew. [#996](https://github.com/pdm-project/pdm/issues/996)
### Improved Documentation
- Document how to install PDM inside a project with Pyprojectx. [#1004](https://github.com/pdm-project/pdm/issues/1004)
### Dependencies
- Support `installer 0.5.x`. [#1002](https://github.com/pdm-project/pdm/issues/1002)
Release v1.13.6 (2022-03-28)
----------------------------
### Bug Fixes
- Default the optional `license` field to "None". [#991](https://github.com/pdm-project/pdm/issues/991)
- Don't create project files in `pdm search` command. [#993](https://github.com/pdm-project/pdm/issues/993)
- Fix a bug that the env vars in source urls in exported result are not expanded. [#997](https://github.com/pdm-project/pdm/issues/997)
Release v1.13.5 (2022-03-23)
----------------------------
### Features & Improvements
- Users can change the install destination of global project to the user site(`~/.local`) with `global_project.user_site` config. [#885](https://github.com/pdm-project/pdm/issues/885)
- Make the path to the global project configurable. Rename the configuration `auto_global` to `global_project.fallback` and deprecate the old name. [#986](https://github.com/pdm-project/pdm/issues/986)
### Bug Fixes
- Fix the compatibility when fetching license information in `show` command. [#966](https://github.com/pdm-project/pdm/issues/966)
- Don't follow symlinks for the paths in the requirement strings. [#976](https://github.com/pdm-project/pdm/issues/976)
- Use the default install scheme when installing build requirements. [#983](https://github.com/pdm-project/pdm/issues/983)
- Fix a bug that `_.site_packages` is overridden by default option value. [#985](https://github.com/pdm-project/pdm/issues/985)
Release v1.13.4 (2022-03-09)
----------------------------
### Features & Improvements
- Update the dependency `pdm-pep517` to support PEP 639. [#959](https://github.com/pdm-project/pdm/issues/959)
### Bug Fixes
- Filter out the unmatched python versions when listing the available versions. [#941](https://github.com/pdm-project/pdm/issues/941)
- Fix a bug displaying the available python versions. [#943](https://github.com/pdm-project/pdm/issues/943)
- Fix a bug under non-UTF8 console encoding. [#960](https://github.com/pdm-project/pdm/issues/960)
- Fix a bug that data files are not copied to the destination when using installation cache. [#961](https://github.com/pdm-project/pdm/issues/961)
Release v1.13.3 (2022-02-24)
----------------------------
### Bug Fixes
- Fix a bug that VCS repo name are parsed as the package name. [#928](https://github.com/pdm-project/pdm/issues/928)
- Support prerelease versions for global projects. [#932](https://github.com/pdm-project/pdm/issues/932)
- Fix a bug that VCS revision in the lock file isn't respected when installing. [#933](https://github.com/pdm-project/pdm/issues/933)
### Dependencies
- Switch from `pythonfinder` to `findpython` as the Python version finder. [#930](https://github.com/pdm-project/pdm/issues/930)
Release v1.13.2 (2022-02-20)
----------------------------
### Bug Fixes
- Fix a regression issue that prereleases can't be installed if the version specifier of the requirement doesn't imply that. [#920](https://github.com/pdm-project/pdm/issues/920)
Release v1.13.1 (2022-02-18)
----------------------------
### Bug Fixes
- Fix a bug that bad pip cache dir value breaks PDM's check update function. [#922](https://github.com/pdm-project/pdm/issues/922)
- Fix a race condition in parallel installation by changing metadata to a lazy property.
This fixes a bug that incompatible wheels are installed unexpectedly. [#924](https://github.com/pdm-project/pdm/issues/924)
Release v1.13.0.post0 (2022-02-18)
----------------------------------
### Bug Fixes
- Fix a bug that incompatible platform-specific wheels are installed. [#921](https://github.com/pdm-project/pdm/issues/921)
Release v1.13.0 (2022-02-18)
----------------------------
### Features & Improvements
- Support `pre_*` and `post_*` scripts for task composition. Pre- and Post- scripts for `init`, `build`, `install` and `lock` will be run if present. [#789](https://github.com/pdm-project/pdm/issues/789)
- Support `--config/-c` option to specify another global configuration file. [#883](https://github.com/pdm-project/pdm/issues/883)
- Packages with extras require no longer inherit the dependencies from the same package without extras. It is because the package without extras are returned as one of the dependencies. This change won't break the existing lock files nor dependency cache. [#892](https://github.com/pdm-project/pdm/issues/892)
- Support version ranges in `[tool.pdm.overrides]` table. [#909](https://github.com/pdm-project/pdm/issues/909)
- Rename config `use_venv` to `python.use_venv`;
rename config `feature.install_cache` to `install.cache`;
rename config `feature.install_cache_method` to `install.cache_method`;
rename config `parallel_install` to `install.parallel`. [#914](https://github.com/pdm-project/pdm/issues/914)
### Bug Fixes
- Fix a bug that file URLs or VCS URLs don't work in `[tool.pdm.overrides]` table. [#861](https://github.com/pdm-project/pdm/issues/861)
- Fix a bug of identifier mismatch for URL requirements without an explicit name. [#901](https://github.com/pdm-project/pdm/issues/901)
- No `requires-python` should be produced if ANY(`*`) is given. [#917](https://github.com/pdm-project/pdm/issues/917)
- Fix a bug that `pdm.lock` gets created when `--dry-run` is passed to `pdm add`. [#918](https://github.com/pdm-project/pdm/issues/918)
### Improved Documentation
- The default editable backend becomes `path`. [#904](https://github.com/pdm-project/pdm/issues/904)
### Removals and Deprecations
- Stop auto-migrating projects from PDM 0.x format. [#912](https://github.com/pdm-project/pdm/issues/912)
### Refactor
- Rename `ExtrasError` to `ExtrasWarning` for better understanding. Improve the warning message. [#892](https://github.com/pdm-project/pdm/issues/892)
- Extract the environment related code from `Candidate` into a new class `PreparedCandidate`.
`Candidate` no longer holds an `Environment` instance. [#920](https://github.com/pdm-project/pdm/issues/920)
Release v1.12.8 (2022-02-06)
----------------------------
### Features & Improvements
- Print the error and continue if a plugin fails to load. [#878](https://github.com/pdm-project/pdm/issues/878)
### Bug Fixes
- PDM now ignores configuration of uninstalled plugins. [#872](https://github.com/pdm-project/pdm/issues/872)
- Fix the compatibility issue with `pip>=22.0`. [#875](https://github.com/pdm-project/pdm/issues/875)
Release v1.12.7 (2022-01-31)
----------------------------
### Features & Improvements
- If no command is given to `pdm run`, it will run the Python REPL. [#856](https://github.com/pdm-project/pdm/issues/856)
### Bug Fixes
- Fix the hash calculation when generating `direct_url.json` for a local pre-built wheel. [#861](https://github.com/pdm-project/pdm/issues/861)
- PDM no longer migrates project meta silently. [#867](https://github.com/pdm-project/pdm/issues/867)
### Dependencies
- Pin `pip<22.0`. [#874](https://github.com/pdm-project/pdm/issues/874)
### Miscellany
- Reduce the number of tests that require network, and mark the rest with `network` marker. [#858](https://github.com/pdm-project/pdm/issues/858)
Release v1.12.6 (2022-01-12)
----------------------------
### Bug Fixes
- Fix a bug that cache dir isn't created. [#843](https://github.com/pdm-project/pdm/issues/843)
Release v1.12.5 (2022-01-11)
----------------------------
### Bug Fixes
- Fix a resolution error that dots in the package name are normalized to `-` unexpectedly. [#853](https://github.com/pdm-project/pdm/issues/853)
Release v1.12.4 (2022-01-11)
----------------------------
### Features & Improvements
- Remember the last selection in `use` command to save the human effort.
And introduce an `-i` option to ignored that remembered value. [#846](https://github.com/pdm-project/pdm/issues/846)
### Bug Fixes
- Fix a bug of uninstall crash when the package has directories in `RECORD`. [#847](https://github.com/pdm-project/pdm/issues/847)
- Fix the `ModuleNotFoundError` during uninstall when the modules required are removed. [#850](https://github.com/pdm-project/pdm/issues/850)
Release v1.12.3 (2022-01-07)
----------------------------
### Features & Improvements
- Support setting Python path in global configuration. [#842](https://github.com/pdm-project/pdm/issues/842)
### Bug Fixes
- Lowercase the package names in the lock file make it more stable. [#836](https://github.com/pdm-project/pdm/issues/836)
- Show the packages to be updated in dry run mode of `pdm update` even if `--no-sync` is passed. [#837](https://github.com/pdm-project/pdm/issues/837)
- Improve the robustness of update check code. [#841](https://github.com/pdm-project/pdm/issues/841)
- Fix a bug that export result has environment markers that don't apply for all requirements. [#843](https://github.com/pdm-project/pdm/issues/843)
Release v1.12.2 (2021-12-30)
----------------------------
### Features & Improvements
- Allow changing the installation linking method by `feature.install_cache_method` config. [#822](https://github.com/pdm-project/pdm/issues/822)
### Bug Fixes
- Fix a bug that namespace packages can't be symlinked to the cache due to existing links. [#820](https://github.com/pdm-project/pdm/issues/820)
- Make PDM generated pth files processed as early as possible. [#821](https://github.com/pdm-project/pdm/issues/821)
- Fix a UnicodeDecodeError for subprocess logger under Windows/GBK. [#823](https://github.com/pdm-project/pdm/issues/823)
Release v1.12.1 (2021-12-24)
----------------------------
### Bug Fixes
- Don't symlink pycaches to the target place. [#817](https://github.com/pdm-project/pdm/issues/817)
Release v1.12.0 (2021-12-22)
----------------------------
### Features & Improvements
- Add `lock --refresh` to update the hash stored with the lock file without updating the pinned versions. [#642](https://github.com/pdm-project/pdm/issues/642)
- Support resolution overriding in the `[tool.pdm.overrides]` table. [#790](https://github.com/pdm-project/pdm/issues/790)
- Add support for signals for basic operations, now including `post_init`, `pre_lock`, `post_lock`, `pre_install` and `post_install`. [#798](https://github.com/pdm-project/pdm/issues/798)
- Add `install --check` to check if the lock file is up to date. [#810](https://github.com/pdm-project/pdm/issues/810)
- Use symlinks to cache installed packages when it is supported by the file system. [#814](https://github.com/pdm-project/pdm/issues/814)
### Bug Fixes
- Fix a bug that candidates from urls are rejected by the `allow_prereleases` setting.
Now non-named requirements are resolved earlier than pinned requirements. [#799](https://github.com/pdm-project/pdm/issues/799)
### Improved Documentation
- Add a new doc page: **API reference**. [#802](https://github.com/pdm-project/pdm/issues/802)
### Dependencies
- Switch back from `atoml` to `tomlkit` as the style-preserving TOML parser. The latter has supported TOML v1.0.0. [#809](https://github.com/pdm-project/pdm/issues/809)
### Miscellany
- Cache the latest version of PDM for one week to reduce the request frequency. [#800](https://github.com/pdm-project/pdm/issues/800)
Release v1.11.3 (2021-12-15)
----------------------------
### Features & Improvements
- Change the default version save strategy to `minimum`, without upper bounds. [#787](https://github.com/pdm-project/pdm/issues/787)
### Bug Fixes
- Fix the patching of sysconfig in PEP 582 initialization script. [#796](https://github.com/pdm-project/pdm/issues/796)
### Miscellany
- Fix an installation failure of the bootstrap script on macOS Catalina. [#793](https://github.com/pdm-project/pdm/issues/793)
- Add a basic benchmarking script. [#794](https://github.com/pdm-project/pdm/issues/794)
Release v1.11.2 (2021-12-10)
----------------------------
### Bug Fixes
- Fix the resolution order to reduce the loop number to find a conflict. [#781](https://github.com/pdm-project/pdm/issues/781)
- Patch the functions in `sysconfig` to return the PEP 582 scheme in `pdm run`. [#784](https://github.com/pdm-project/pdm/issues/784)
### Dependencies
- Remove the upper bound of version constraints for most dependencies, except for some zero-versioned ones. [#787](https://github.com/pdm-project/pdm/issues/787)
Release v1.11.1 (2021-12-08)
----------------------------
### Features & Improvements
- Support `--pre/--prerelease` option for `pdm add` and `pdm update`. It will allow prereleases to be pinned. [#774](https://github.com/pdm-project/pdm/issues/774)
- Improve the error message when python is found but not meeting the python requirement. [#777](https://github.com/pdm-project/pdm/issues/777)
### Bug Fixes
- Fix a bug that `git+https` candidates cannot be resolved. [#771](https://github.com/pdm-project/pdm/issues/771)
- Fix an infinite resolution loop by resolving the top-level packages first. Also deduplicate the lines from the same requirement in the error output. [#776](https://github.com/pdm-project/pdm/issues/776)
### Miscellany
- Fix the install script to use a zipapp of virtualenv when it isn't installed. [#780](https://github.com/pdm-project/pdm/issues/780)
Release v1.11.0 (2021-11-30)
----------------------------
### Features & Improvements
- Move `version` from `[project]` table to `[tool.pdm]` table, delete `classifiers` from `dynamic`, and warn usage about the deprecated usages. [#748](https://github.com/pdm-project/pdm/issues/748)
- Add support for Conda environments in addition to Python virtual environments. [#749](https://github.com/pdm-project/pdm/issues/749)
- Add support for saving only the lower bound `x >= VERSION` when adding dependencies. [#752](https://github.com/pdm-project/pdm/issues/752)
- Improve the error message when resolution fails. [#754](https://github.com/pdm-project/pdm/issues/754)
### Bug Fixes
- Switch to self-implemented `pdm list --freeze` to fix a bug due to Pip's API change. [#533](https://github.com/pdm-project/pdm/issues/533)
- Fix an infinite loop issue when resolving candidates with incompatible `requires-python`. [#744](https://github.com/pdm-project/pdm/issues/744)
- Fix the python finder to support pyenv-win. [#745](https://github.com/pdm-project/pdm/issues/745)
- Fix the ANSI color output for Windows cmd and Powershell terminals. [#753](https://github.com/pdm-project/pdm/issues/753)
### Removals and Deprecations
- Remove `-s/--section` option from all previously supported commands. Use `-G/--group` instead. [#756](https://github.com/pdm-project/pdm/issues/756)
Release v1.10.3 (2021-11-18)
----------------------------
### Bug Fixes
- Use `importlib` to replace `imp` in the `sitecustomize` module for Python 3. [#574](https://github.com/pdm-project/pdm/issues/574)
- Fix the lib paths under non-isolated build. [#740](https://github.com/pdm-project/pdm/issues/740)
- Exclude the dependencies with extras in the result of `pdm export`. [#741](https://github.com/pdm-project/pdm/issues/741)
Release v1.10.2 (2021-11-14)
----------------------------
### Features & Improvements
- Add a new option `-s/--site-packages` to `pdm run` as well as a script config item. When it is set to `True`, site-packages from the selected interpreter will be loaded into the running environment. [#733](https://github.com/pdm-project/pdm/issues/733)
### Bug Fixes
- Now `NO_SITE_PACKAGES` isn't set in `pdm run` if the executable is out of local packages. [#733](https://github.com/pdm-project/pdm/issues/733)
Release v1.10.1 (2021-11-09)
----------------------------
### Features & Improvements
- Isolate the project environment with system site packages in `pdm run`, but keep them seen when PEP 582 is enabled. [#708](https://github.com/pdm-project/pdm/issues/708)
### Bug Fixes
- Run `pip` with `--isolated` when building wheels. In this way some env vars like `PIP_REQUIRE_VIRTUALENV` can be ignored. [#669](https://github.com/pdm-project/pdm/issues/669)
- Fix the install script to ensure `pip` is not DEBUNDLED. [#685](https://github.com/pdm-project/pdm/issues/685)
- Fix a bug that when `summary` is `None`, the lockfile can't be generated. [#719](https://github.com/pdm-project/pdm/issues/719)
- `${PROJECT_ROOT}` should be written in the URL when relative path is given. [#721](https://github.com/pdm-project/pdm/issues/721)
- Fix a bug that when project table already exists, `pdm import` can't merge the settings correctly. [#723](https://github.com/pdm-project/pdm/issues/723)
Release v1.10.0 (2021-10-25)
----------------------------
### Features & Improvements
- Add `--no-sync` option to `update` command. [#684](https://github.com/pdm-project/pdm/issues/684)
- Support `find_links` source type. It can be specified via `type` key of `[[tool.pdm.source]]` table. [#694](https://github.com/pdm-project/pdm/issues/694)
- Add `--dry-run` option to `add`, `install` and `remove` commands. [#698](https://github.com/pdm-project/pdm/issues/698)
### Bug Fixes
- Remove trailing whitespace with terminal output of tables (via `project.core.ui.display_columns`), fixing unnecessary wrapping due to / with empty lines full of spaces in case of long URLs in the last column. [#680](https://github.com/pdm-project/pdm/issues/680)
- Include files should be installed under venv's base path. [#682](https://github.com/pdm-project/pdm/issues/682)
- Ensure the value of `check_update` is boolean. [#689](https://github.com/pdm-project/pdm/issues/689)
### Improved Documentation
- Update the contributing guide, remove the usage of `setup_dev.py` in favor of `pip install`. [#676](https://github.com/pdm-project/pdm/issues/676)
Release v1.9.0 (2021-10-12)
---------------------------
### Bug Fixes
- Fix a bug that `requires-python` is not recognized in candidates evaluation. [#657](https://github.com/pdm-project/pdm/issues/657)
- Fix the path order when pdm run so that executables in local packages dir are found first. [#678](https://github.com/pdm-project/pdm/issues/678)
### Dependencies
- Update `installer` to `0.3.0`, fixing a bug that broke installation of some packages with unusual wheel files. [#653](https://github.com/pdm-project/pdm/issues/653)
- Change `packaging` and `typing-extensions` to direct dependencies. [#674](https://github.com/pdm-project/pdm/issues/674)
### Refactor
- `requires-python` now participates in the resolution as a dummy requirement. [#658](https://github.com/pdm-project/pdm/issues/658)
Release v1.8.5 (2021-09-16)
---------------------------
### Bug Fixes
- Fix the error of regex to find the shebang line. [#656](https://github.com/pdm-project/pdm/issues/656)
Release v1.8.4 (2021-09-15)
---------------------------
### Features & Improvements
- Support `--no-isolation` option for `install`, `lock`, `update`, `remove`, `sync` commands. [#640](https://github.com/pdm-project/pdm/issues/640)
- Make `project_max_depth` configurable and default to `5`. [#643](https://github.com/pdm-project/pdm/issues/643)
### Bug Fixes
- Don't try `pdm-pep517` backend on Python 2.7 when installing self as editable. [#640](https://github.com/pdm-project/pdm/issues/640)
- Fix a bug that existing shebang can't be replaced correctly. [#651](https://github.com/pdm-project/pdm/issues/651)
- Fix the version range saving for prerelease versions. [#654](https://github.com/pdm-project/pdm/issues/654)
Release v1.8.3 (2021-09-07)
---------------------------
### Features & Improvements
- Allow to build in non-isolated environment, to enable optional speedups depending on the environment. [#635](https://github.com/pdm-project/pdm/issues/635)
### Bug Fixes
- Don't copy `*-nspkg.pth` files in `install_cache` mode. It will still work without them. [#623](https://github.com/pdm-project/pdm/issues/623)
Release v1.8.2 (2021-09-01)
---------------------------
### Bug Fixes
- Fix the removal issue of standalone pyc files [#633](https://github.com/pdm-project/pdm/issues/633)
Release v1.8.1 (2021-08-26)
---------------------------
### Features & Improvements
- Add `-r/--reinstall` option to `sync` command to force re-install the existing dependencies. [#601](https://github.com/pdm-project/pdm/issues/601)
- Show update hint after every pdm command. [#603](https://github.com/pdm-project/pdm/issues/603)
- `pdm cache clear` can clear cached installations if not needed any more. [#604](https://github.com/pdm-project/pdm/issues/604)
### Bug Fixes
- Fix the editable install script so that `setuptools` won't see the dependencies under local packages. [#601](https://github.com/pdm-project/pdm/issues/601)
- Preserve the executable bit when installing wheels. [#606](https://github.com/pdm-project/pdm/issues/606)
- Write PEP 610 metadata `direct_url.json` when installing wheels. [#607](https://github.com/pdm-project/pdm/issues/607)
- Fix a bug that `*` fails to be converted as `SpecifierSet`. [#609](https://github.com/pdm-project/pdm/issues/609)
### Refactor
- Build editable packages are into wheels via PEP 660 build backend. Now all installations are unified into wheels. [#612](https://github.com/pdm-project/pdm/issues/612)
Release v1.8.0 (2021-08-16)
---------------------------
### Features & Improvements
- Added a new mode `--json` to the list command which outputs the dependency graph as a JSON document. [#583](https://github.com/pdm-project/pdm/issues/583)
- Add a new config `feature.install_cache`. When it is turned on, wheels will be installed into a centralized package repo and create `.pth` files under project packages directory to link to the cached package. [#589](https://github.com/pdm-project/pdm/issues/589)
### Bug Fixes
- Fix env vars in source URLs not being expanded in all cases. [#570](https://github.com/pdm-project/pdm/issues/570)
- Fix the weird output of `pdm show`. [#580](https://github.com/pdm-project/pdm/issues/580)
- Prefer `~/.pyenv/shims/python3` as the pyenv interpreter. [#590](https://github.com/pdm-project/pdm/issues/590)
- Fix a bug that installing will download candidates that do not match the locked hashes. [#596](https://github.com/pdm-project/pdm/issues/596)
### Improved Documentation
- Added instructions to the Contributing section for creating news fragments [#573](https://github.com/pdm-project/pdm/issues/573)
### Removals and Deprecations
- Deprecate `-s/--section` option in favor of `-G/--group`. [#591](https://github.com/pdm-project/pdm/issues/591)
### Refactor
- Switch to a self-implemented version of uninstaller. [#586](https://github.com/pdm-project/pdm/issues/586)
- `pdm/installers/installers.py` is renamed to `pdm/installers/manager.py` to be more accurate. The `Installer` class under that file is renamed to `InstallerManager` and is exposed in the `pdm.core.Core` object for overriding. The new `pdm/installers/installers.py` contains some installation implementations. [#589](https://github.com/pdm-project/pdm/issues/589)
- Switch from `pkg_resources.Distribution` to the implementation of `importlib.metadata`. [#592](https://github.com/pdm-project/pdm/issues/592)
Release v1.7.2 (2021-07-30)
---------------------------
### Bug Fixes
- Remove the existing files before installing. [#565](https://github.com/pdm-project/pdm/issues/565)
- Deduplicate the plugins list. [#566](https://github.com/pdm-project/pdm/issues/566)
Release v1.7.1 (2021-07-29)
---------------------------
### Bug Fixes
- Accept non-canonical distribution name in the wheel's dist-info directory name. [#529](https://github.com/pdm-project/pdm/issues/529)
- Prefer requirements with narrower version constraints or allowing prereleases to find matches. [#551](https://github.com/pdm-project/pdm/issues/551)
- Use the underlying real executable path for writing shebangs. [#553](https://github.com/pdm-project/pdm/issues/553)
- Fix a bug that extra markers cannot be extracted when combined with other markers with "and". [#559](https://github.com/pdm-project/pdm/issues/559)
- Fix a bug that redacted credentials in source urls get overwritten with the plain text after locking. [#561](https://github.com/pdm-project/pdm/issues/561)
### Refactor
- Use installer as the wheel installer, replacing `distlib`. [#519](https://github.com/pdm-project/pdm/issues/519)
Release v1.7.0 (2021-07-20)
---------------------------
### Features & Improvements
- Support showing individual fields by `--<field-name>` options in pdm show. When no package is given, show this project. [#527](https://github.com/pdm-project/pdm/issues/527)
- Add `--freeze` option to `pdm list` command which shows the dependencies list as pip's requirements.txt format. [#531](https://github.com/pdm-project/pdm/issues/531)
### Bug Fixes
- Fix the path manipulation on Windows, now the PEP 582 path is prepended to the `PYTHONPATH`. [#522](https://github.com/pdm-project/pdm/issues/522)
- Fix the handling of auth prompting: will try keyring in non-verbose mode. [#523](https://github.com/pdm-project/pdm/issues/523)
- Recognize old entry point name "pdm.plugin" for backward-compatibility. [#530](https://github.com/pdm-project/pdm/issues/530)
- Match the VCS scheme in case-insensitive manner. [#537](https://github.com/pdm-project/pdm/issues/537)
- Use the default permission bits when writing project files. [#542](https://github.com/pdm-project/pdm/issues/542)
- Fix the VCS url to be consistent between lock and install. [#547](https://github.com/pdm-project/pdm/issues/547)
### Improved Documentation
- Add installation instructions for Scoop. [#522](https://github.com/pdm-project/pdm/issues/522)
### Dependencies
- Update `pdm-pep517` to `0.8.0`. [#524](https://github.com/pdm-project/pdm/issues/524)
- Switch from `toml` to `tomli`. [#541](https://github.com/pdm-project/pdm/issues/541)
### Refactor
- Separate the build env into two different levels for better caching. [#541](https://github.com/pdm-project/pdm/issues/541)
- Refactor the build part into smaller functions. [#543](https://github.com/pdm-project/pdm/issues/543)
Release v1.6.4 (2021-06-23)
---------------------------
### Features & Improvements
- Extract package name from egg-info in filename when eligible. Remove the patching code of resolvelib's inner class. [#441](https://github.com/pdm-project/pdm/issues/441)
- Support installing packages from subdirectories of VCS repository. [#507](https://github.com/pdm-project/pdm/issues/507)
- Add an install script to bootstrap PDM quickly without help of other tools. Modify docs to recommend this installation method. [#508](https://github.com/pdm-project/pdm/issues/508)
- Add a new subcommand `plugin` to manage pdm plugins, including `add`, `remove` and `list` commands. [#510](https://github.com/pdm-project/pdm/issues/510)
### Bug Fixes
- Don't monkeypatch the internal class of `resolvelib` any more. This makes PDM more stable across updates of sub-dependencies. [#515](https://github.com/pdm-project/pdm/issues/515)
### Miscellany
- Clear the type errors from mypy. [#261](https://github.com/pdm-project/pdm/issues/261)
Release v1.6.3 (2021-06-17)
---------------------------
### Features & Improvements
- Add an option `-u/--unconstrained` to support unconstraining version specifiers when adding packages. [#501](https://github.com/pdm-project/pdm/issues/501)
### Bug Fixes
- Fix the format of dependency arrays when a new value is appended. [#487](https://github.com/pdm-project/pdm/issues/487)
- Allow missing email attribute for authors and maintainers. [#492](https://github.com/pdm-project/pdm/issues/492)
- Fix a bug that editable install shouldn't require pyproject.toml to be valid. [#497](https://github.com/pdm-project/pdm/issues/497)
- Fix a bug on macOS that purelib and platlib paths of isolated build envs cannot be substituted correctly if the Python is a framework build. [#502](https://github.com/pdm-project/pdm/issues/502)
- Fix the version sort of candidates. [#506](https://github.com/pdm-project/pdm/issues/506)
Release v1.6.2 (2021-05-31)
---------------------------
No significant changes.
Release v1.6.1 (2021-05-31)
---------------------------
No significant changes.
Release v1.6.0 (2021-05-31)
---------------------------
### Features & Improvements
- Use a new approach to determine the packages to be installed. This requires a quick resolution step before installation. [#456](https://github.com/pdm-project/pdm/issues/456)
- `pdm export` no longer produces requirements file applicable for all platforms due to the new approach. [#456](https://github.com/pdm-project/pdm/issues/456)
- Add structural typing for requirements module. Refactor the requirements module for that purpose. [#433](https://github.com/pdm-project/pdm/issues/433)
- Introduce `--no-editable` option to install non-editable versions of all packages. [#443](https://github.com/pdm-project/pdm/issues/443)
- Introduce `--no-self` option to prevent the project itself from being installed. [#444](https://github.com/pdm-project/pdm/issues/444)
- Add a default `.gitignore` file in the `__pypackages__` directory. [#446](https://github.com/pdm-project/pdm/issues/446)
- Check if the lock file version is compatible with PDM program before installation. [#463](https://github.com/pdm-project/pdm/issues/463)
- Expose the project root path via `PDM_PROJECT_ROOT` env var. Change to the project root when executing scripts. [#470](https://github.com/pdm-project/pdm/issues/470)
- Fix a bug that installation resolution doesn't respect the requirement markers from pyproject config. [#480](https://github.com/pdm-project/pdm/issues/480)
### Bug Fixes
- Changing to multiline breaks the parsing of TOML document. [#462](https://github.com/pdm-project/pdm/issues/462)
- Fix a bug that transient dependencies of conditional requirements can't be resolved. [#472](https://github.com/pdm-project/pdm/issues/472)
- Fix a bug that invalid wheels are rejected while they are acceptable for resolution. [#473](https://github.com/pdm-project/pdm/issues/473)
- Fix a bug that build environment is not fully isolated with the hosted environment. [#477](https://github.com/pdm-project/pdm/issues/477)
- Ensure the lock file is compatible before looking for the locked candidates. [#484](https://github.com/pdm-project/pdm/issues/484)
### Improved Documentation
- Fix 404 links in documentation. [#472](https://github.com/pdm-project/pdm/issues/472)
### Dependencies
- Migrate from `tomlkit` to `atoml` as the style-preserving TOML parser and writer. [#465](https://github.com/pdm-project/pdm/issues/465)
### Removals and Deprecations
- Remove the warning of `--dev` flag for older versions of PDM. [#444](https://github.com/pdm-project/pdm/issues/444)
### Miscellany
- Add Python 3.10 beta CI job. [#457](https://github.com/pdm-project/pdm/issues/457)
Release v1.5.3 (2021-05-10)
---------------------------
### Features & Improvements
- Support passing options to the build backends via `--config-setting`. [#452](https://github.com/pdm-project/pdm/issues/452)
### Bug Fixes
- Seek for other sitecustomize.py to import. [#422](https://github.com/pdm-project/pdm/issues/422)
- Fix an unescaped single quote in fish completion script. [#423](https://github.com/pdm-project/pdm/issues/423)
- The hashes of a remote file candidate should be calculated from the link itself. [#450](https://github.com/pdm-project/pdm/issues/450)
### Dependencies
- Remove `keyring` as a dependency and guide users to install it when it is not available. [#442](https://github.com/pdm-project/pdm/issues/442)
- Specify the minimum version of `distlib`. [#447](https://github.com/pdm-project/pdm/issues/447)
### Miscellany
- Add log output about found candidates and their origin. [#421](https://github.com/pdm-project/pdm/issues/421)
- Add [mypy](https://github.com/python/mypy) pre-commit hook [#427](https://github.com/pdm-project/pdm/issues/427)
- Improve type safety of `pdm.cli.actions` [#428](https://github.com/pdm-project/pdm/issues/428)
- Fix wrong mypy configuration. [#451](https://github.com/pdm-project/pdm/issues/451)
Release v1.5.2 (2021-04-27)
---------------------------
### Features & Improvements
- Allow `pdm use` with no argument given, which will list all available pythons for pick. [#409](https://github.com/pdm-project/pdm/issues/409)
### Bug Fixes
- Inform user to enable PEP 582 for development script to work. [#404](https://github.com/pdm-project/pdm/issues/404)
- Check the existence of pyenv shim Python interpreter before using it. [#406](https://github.com/pdm-project/pdm/issues/406)
- Fix a bug that executing `setup.py` failed for NameError. [#407](https://github.com/pdm-project/pdm/issues/407)
- Check before setting the PYTHONPATH environment variable for PEP582 [#410](https://github.com/pdm-project/pdm/issues/410)
- Fix development setup error. [#415](https://github.com/pdm-project/pdm/issues/415)
### Dependencies
- Update pip to 21.1 and fix compatibility issues. [#412](https://github.com/pdm-project/pdm/issues/412)
Release v1.5.1 (2021-04-22)
---------------------------
### Bug Fixes
- Make func translate_sections pure to avoid exporting requirements in random order. [#401](https://github.com/pdm-project/pdm/issues/401)
- Expand the variables in install requirements' attributes for build. [#402](https://github.com/pdm-project/pdm/issues/402)
Release v1.5.0 (2021-04-20)
---------------------------
### Features & Improvements
- Include dev dependencies by default for `install` and `sync` commands. Add a new option `--prod/--production` to exclude them. Improve the dependency selection logic to be more convenient to use — the more common the usage is, the shorter the command is. [#391](https://github.com/pdm-project/pdm/issues/391)
### Bug Fixes
- Enquote executable path to ensure generating valid scripts. [#387](https://github.com/pdm-project/pdm/issues/387)
- Consider hashes when fetching artifact link for build. [#389](https://github.com/pdm-project/pdm/issues/389)
- Consider the sources settings when building. [#399](https://github.com/pdm-project/pdm/issues/399)
### Improved Documentation
- New pdm setting `source-includes` to mark files to be included only in sdist builds. [#390](https://github.com/pdm-project/pdm/issues/390)
### Dependencies
- Update `pdm-pep517` to `0.7.0`; update `resolvelib` to` 0.7.0`. [#390](https://github.com/pdm-project/pdm/issues/390)
### Removals and Deprecations
- Deprecate the usage of `-d/--dev` option in `install` and `sync` commands. [#391](https://github.com/pdm-project/pdm/issues/391)
Release v1.5.0b1 (2021-04-12)
-----------------------------
### Features & Improvements
- Improve the env builder to run in isolated mode. [#384](https://github.com/pdm-project/pdm/issues/384)
### Bug Fixes
- Remove the incompatible code from the files that will be run in-process. [#375](https://github.com/pdm-project/pdm/issues/375)
- Get the correct Python ABI tag of selected interpreter [#378](https://github.com/pdm-project/pdm/issues/378)
- Error out when doing `pdm run` on a directory not initialized yet.
- Give warning message when the project automatically fallbacks to the global project.
### Dependencies
- Upgrade `resolvelib` to `0.6.0`. [#381](https://github.com/pdm-project/pdm/issues/381)
### Miscellany
- refactor `pdm.models.readers` to improve typing support [#321](https://github.com/pdm-project/pdm/issues/321)
- Add a basic integration test for cross-python check. [#377](https://github.com/pdm-project/pdm/issues/377)
- Refactor the `project.python_executable` to `project.python` that contains all info of the interpreter. [#382](https://github.com/pdm-project/pdm/issues/382)
- Continue refactoring Python info to extract to its own module. [#383](https://github.com/pdm-project/pdm/issues/383)
- Refactor the creation of project.
Release v1.5.0b0 (2021-04-03)
-----------------------------
### Features & Improvements
- Add hand-written zsh completion script. [#188](https://github.com/pdm-project/pdm/issues/188)
- Add a special value `:all` given to `-s/--section` to refer to all sections under the same species.
Adjust `add`, `sync`, `install`, `remove` and `update` to support the new `dev-dependencies` groups. Old behavior will be kept the same. [#351](https://github.com/pdm-project/pdm/issues/351)
- `dev-dependencies` is now a table of dependencies groups, where key is the group name and value is an array of dependencies. These dependencies won't appear in the distribution's metadata. `dev-dependencies` of the old format will turn into `dev` group under `dev-dependencies`. [#351](https://github.com/pdm-project/pdm/issues/351)
- Move `dev-dependencies`, `includes`, `excludes` and `package-dir` out from `[project]` table to `[tool.pdm]` table. The migration will be done automatically if old format is detected. [#351](https://github.com/pdm-project/pdm/issues/351)
- Throws an error with meaningful message when no candidate is found for one requirement. [#357](https://github.com/pdm-project/pdm/issues/357)
- Support `--dry-run` option for `update` command to display packages that need update, install or removal. Add `--top` option to limit to top level packages only. [#358](https://github.com/pdm-project/pdm/issues/358)
- Full-featured completion scripts for Zsh and Powershell - section selection, package name autocompletion and so on. Windows is a first-class citizen! [#367](https://github.com/pdm-project/pdm/issues/367)
- Support non-interactive `init` command via `-n/--non-interactive` option. No question will be asked in this mode. [#368](https://github.com/pdm-project/pdm/issues/368)
- Show project packages path(PEP 582) in the output of `pdm info`, also add an option `--packages` to show that value only. [#372](https://github.com/pdm-project/pdm/issues/372)
### Bug Fixes
- Fix a bug that pure python libraries are not loaded to construct the WorkingSet. [#346](https://github.com/pdm-project/pdm/issues/346)
- Don't write `<script>-X.Y` variant to the bin folder. [#365](https://github.com/pdm-project/pdm/issues/365)
- Python is now run in isolated mode via subprocess to avoid accidentally importing user packages. [#369](https://github.com/pdm-project/pdm/issues/369)
- Don't overwrite existing dependencies when importing from requirements.txt. [#370](https://github.com/pdm-project/pdm/issues/370)
### Improved Documentation
- Add instructions of how to integrate PDM with Emacs, contributed by @linw1995. [#372](https://github.com/pdm-project/pdm/issues/372)
### Removals and Deprecations
- Remove the support of project path following `-g/--global` that was deprecated in `1.4.0`. One should use `-g -p <project_path>` for that purpose. [#361](https://github.com/pdm-project/pdm/issues/361)
### Miscellany
- Add test coverage to PDM. [#109](https://github.com/pdm-project/pdm/issues/109)
- Add type annotations into untyped functions to start using mypy. [#354](https://github.com/pdm-project/pdm/issues/354)
- Refactor the format converter code to be more explicit. [#360](https://github.com/pdm-project/pdm/issues/360)
Release v1.4.5 (2021-03-30)
---------------------------
### Features & Improvements
- Skip the first prompt of `pdm init` [#352](https://github.com/pdm-project/pdm/issues/352)
### Bug Fixes
- Fix a test failure when using homebrew installed python. [#348](https://github.com/pdm-project/pdm/issues/348)
- Get revision from the VCS URL if source code isn't downloaded to local. [#349](https://github.com/pdm-project/pdm/issues/349)
### Dependencies
- Update dependency `pdm-pep517` to `0.6.1`. [#353](https://github.com/pdm-project/pdm/issues/353)
Release v1.4.4 (2021-03-27)
---------------------------
### Features & Improvements
- Emit warning if version or description can't be retrieved when importing from flit metadata. [#342](https://github.com/pdm-project/pdm/issues/342)
- Add `type` argument to `pdm cache clear` and improve its UI. [#343](https://github.com/pdm-project/pdm/issues/343)
- Always re-install the editable packages when syncing the working set. This can help tracking the latest change of `entry-points`. [#344](https://github.com/pdm-project/pdm/issues/344)
### Bug Fixes
- Make installer quit early if a wheel isn't able to build. [#338](https://github.com/pdm-project/pdm/issues/338)
### Miscellany
- ignore type checking in `models.project_info.ProjectInfo`, which indexes `distlib.metadata._data` [#335](https://github.com/pdm-project/pdm/issues/335)
Release v1.4.3 (2021-03-24)
---------------------------
### Features & Improvements
- Change the group name of entry points from `pdm.plugins` to `pdm`.
Export some useful objects and models for shorter import path. [#318](https://github.com/pdm-project/pdm/issues/318)
- Field `cmd` in `tools.pdm.scripts` configuration items now allows specifying an argument array instead of a string.
- Refactor: Remove the reference of `stream` singleton, improve the UI related code. [#320](https://github.com/pdm-project/pdm/issues/320)
- Support dependencies managed by poetry and flit being installed as editable packages. [#324](https://github.com/pdm-project/pdm/issues/324)
- Refactor: Extract the logic of finding interpreters to method for the sake of subclass overriding. [#326](https://github.com/pdm-project/pdm/issues/326)
- Complete the `cache` command, add `list`, `remove` and `info` subcommands. [#329](https://github.com/pdm-project/pdm/issues/329)
- Refactor: Unify the code about selecting interpreter to reduce the duplication. [#331](https://github.com/pdm-project/pdm/issues/331)
- Retrieve the version and description of a flit project by parsing the AST of the main file. [#333](https://github.com/pdm-project/pdm/issues/333)
### Bug Fixes
- Fix a parsing error when non-ascii characters exist in `pyproject.toml`. [#308](https://github.com/pdm-project/pdm/issues/308)
- Fix a bug that non-editable VCS candidates can't satisfy their requirements once locked in the lock file. [#314](https://github.com/pdm-project/pdm/issues/314)
- Fix a bug of import-on-init that fails when requirements.txt is detected. [#328](https://github.com/pdm-project/pdm/issues/328)
### Miscellany
- refactor `pdm.iostream` to improve 'typing' support [#301](https://github.com/pdm-project/pdm/issues/301)
- fix some typos [#323](https://github.com/pdm-project/pdm/issues/323)
Release v1.4.2 (2021-03-18)
---------------------------
### Features & Improvements
- Refactor the code, extract the version related logic from `specifiers.py` to a separated module. [#303](https://github.com/pdm-project/pdm/issues/303)
### Bug Fixes
- Fix a bug that get_dependencies() returns error when the `setup.py` has no `install_requires` key. [#299](https://github.com/pdm-project/pdm/issues/299)
- Pin the VCS revision for non-editable VCS candidates in the lock file. [#305](https://github.com/pdm-project/pdm/issues/305)
- Fix a bug that editable build hits the cached wheel unexpectedly. [#307](https://github.com/pdm-project/pdm/issues/307)
### Miscellany
- replace 'typing comments' with type annotations throughout [#298](https://github.com/pdm-project/pdm/issues/298)
Release v1.4.1 (2021-03-12)
---------------------------
### Features & Improvements
- Support importing dependencies from requirements.txt to dev-dependencies or sections. [#291](https://github.com/pdm-project/pdm/issues/291)
### Bug Fixes
- Fallback to static parsing when building was failed to find the dependencies of a candidate. [#293](https://github.com/pdm-project/pdm/issues/293)
- Fix a bug that `pdm init` fails when `pyproject.toml` exists but has no `[project]` section. [#295](https://github.com/pdm-project/pdm/issues/295)
### Improved Documentation
- Document about how to use PDM with Nox. [#281](https://github.com/pdm-project/pdm/issues/281)
Release v1.4.0 (2021-03-05)
---------------------------
### Features & Improvements
- When `-I/--ignore-python` passed or `PDM_IGNORE_SAVED_PYTHON=1`, ignore the interpreter set in `.pdm.toml` and don't save to it afterwards. [#283](https://github.com/pdm-project/pdm/issues/283)
- A new option `-p/--project` is introduced to specify another path for the project base. It can also be combined with `-g/--global` option.
The latter is changed to a flag only option that does not accept values. [#286](https://github.com/pdm-project/pdm/issues/286)
- Support `-f setuppy` for `pdm export` to export the metadata as setup.py [#289](https://github.com/pdm-project/pdm/issues/289)
### Bug Fixes
- Fix a bug that editable local package requirements cannot be parsed rightly. [#285](https://github.com/pdm-project/pdm/issues/285)
- Change the priority of metadata files to parse so that PEP 621 metadata will be parsed first. [#288](https://github.com/pdm-project/pdm/issues/288)
### Improved Documentation
- Add examples of how to integrate with CI pipelines (and tox). [#281](https://github.com/pdm-project/pdm/issues/281)
Release v1.3.4 (2021-03-01)
---------------------------
### Improved Documentation
- added documentation on a [task provider for vscode](https://marketplace.visualstudio.com/items?itemName=knowsuchagency.pdm-task-provider) [#280](https://github.com/pdm-project/pdm/issues/280)
### Bug Fixes
- Ignore the python requires constraints when fetching the link from the PyPI index.
Release v1.3.3 (2021-02-26)
---------------------------
### Bug Fixes
- Fix the requirement string of a VCS requirement to comply with PEP 508. [#275](https://github.com/pdm-project/pdm/issues/275)
- Fix a bug that editable packages with `src` directory can't be uninstalled correctly. [#277](https://github.com/pdm-project/pdm/issues/277)
- Fix a bug that editable package doesn't override the non-editable version in the working set. [#278](https://github.com/pdm-project/pdm/issues/278)
Release v1.3.2 (2021-02-25)
---------------------------
### Features & Improvements
- Abort and tell user the selected section following `pdm sync` or `pdm install` is not present in the error message. [#274](https://github.com/pdm-project/pdm/issues/274)
### Bug Fixes
- Fix a bug that candidates' sections cannot be retrieved rightly when circular dependencies exist. [#270](https://github.com/pdm-project/pdm/issues/270)
- Don't pass the help argument into the run script method. [#272](https://github.com/pdm-project/pdm/issues/272)
Release v1.3.1 (2021-02-19)
---------------------------
### Bug Fixes
- Use the absolute path when importing from a Poetry pyproject.toml. [#262](https://github.com/pdm-project/pdm/issues/262)
- Fix a bug that old toml table head is kept when converting to PEP 621 metadata format. [#263](https://github.com/pdm-project/pdm/issues/263)
- Postpone the evaluation of `requires-python` attribute when fetching the candidates of a package. [#264](https://github.com/pdm-project/pdm/issues/264)
Release v1.3.0 (2021-02-09)
---------------------------
### Features & Improvements
- Increase the default value of the max rounds of resolution to 1000, make it configurable. [#238](https://github.com/pdm-project/pdm/issues/238)
- Rewrite the project's `egg-info` directory when dependencies change. So that `pdm list --graph` won't show invalid entries. [#240](https://github.com/pdm-project/pdm/issues/240)
- When importing requirements from a `requirements.txt` file, build the package to find the name if not given in the URL. [#245](https://github.com/pdm-project/pdm/issues/245)
- When initializing the project, prompt user for whether the project is a library, and give empty `name` and `version` if not. [#253](https://github.com/pdm-project/pdm/issues/253)
### Bug Fixes
- Fix the version validator of wheel metadata to align with the implementation of `packaging`. [#130](https://github.com/pdm-project/pdm/issues/130)
- Preserve the `sections` value of a pinned candidate to be reused. [#234](https://github.com/pdm-project/pdm/issues/234)
- Strip spaces in user input when prompting for the python version to use. [#252](https://github.com/pdm-project/pdm/issues/252)
- Fix the version parsing of Python requires to allow `>`, `>=`, `<`, `<=` to combine with star versions. [#254](https://github.com/pdm-project/pdm/issues/254)
Release v1.2.0 (2021-01-26)
---------------------------
### Features & Improvements
- Change the behavior of `--save-compatible` slightly. Now the version specifier saved is using the REAL compatible operator `~=` as described in PEP 440. Before: `requests<3.0.0,>=2.19.1`, After: `requests~=2.19`. The new specifier accepts `requests==2.19.0` as compatible version. [#225](https://github.com/pdm-project/pdm/issues/225)
- Environment variable `${PROJECT_ROOT}` in the dependency specification can be expanded to refer to the project root in pyproject.toml.
The environment variables will be kept as they are in the lock file. [#226](https://github.com/pdm-project/pdm/issues/226)
- Change the dependencies of a package in the lock file to a list of PEP 508 strings [#236](https://github.com/pdm-project/pdm/issues/236)
### Bug Fixes
- Ignore user's site and `PYTHONPATH`(with `python -I` mode) when executing pip commands. [#231](https://github.com/pdm-project/pdm/issues/231)
### Improved Documentation
- Document about how to activate and use a plugin. [#227](https://github.com/pdm-project/pdm/issues/227)
### Dependencies
- Test project on `pip 21.0`. [#235](https://github.com/pdm-project/pdm/issues/235)
Release v1.1.0 (2021-01-18)
---------------------------
### Features & Improvements
- Allow users to hide secrets from the `pyproject.toml`.
- Dynamically expand env variables in the URLs in dependencies and indexes.
- Ask whether to store the credentials provided by the user.
- A user-friendly error will show when credentials are not provided nor correct. [#198](https://github.com/pdm-project/pdm/issues/198)
- Use a different package dir for
gitextract_02e0wlec/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ └── feature_request.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── ci.yml
│ ├── claude.yml
│ └── release.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .pre-commit-hooks.yaml
├── .readthedocs.yaml
├── AGENTS.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── README_zh.md
├── SECURITY.md
├── codecov.yml
├── docs/
│ ├── assets/
│ │ ├── extra.css
│ │ └── extra.js
│ ├── dev/
│ │ ├── benchmark.md
│ │ ├── changelog.md
│ │ ├── contributing.md
│ │ ├── fixtures.md
│ │ └── write.md
│ ├── index.md
│ ├── overrides/
│ │ └── main.html
│ ├── reference/
│ │ ├── api.md
│ │ ├── build.md
│ │ ├── cli.md
│ │ ├── configuration.md
│ │ └── pep621.md
│ └── usage/
│ ├── advanced.md
│ ├── config.md
│ ├── dependency.md
│ ├── hooks.md
│ ├── lock-targets.md
│ ├── lockfile.md
│ ├── pep582.md
│ ├── project.md
│ ├── publish.md
│ ├── scripts.md
│ ├── template.md
│ ├── uv.md
│ └── venv.md
├── install-pdm.ps1
├── install-pdm.py
├── install-pdm.py.sha256
├── install-pdm.sh
├── mkdocs.yml
├── news/
│ ├── .gitkeep
│ └── 3541.misc.md
├── pyproject.toml
├── src/
│ └── pdm/
│ ├── __init__.py
│ ├── __main__.py
│ ├── __version__.py
│ ├── _types.py
│ ├── builders/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── editable.py
│ │ ├── sdist.py
│ │ └── wheel.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── actions.py
│ │ ├── commands/
│ │ │ ├── __init__.py
│ │ │ ├── add.py
│ │ │ ├── base.py
│ │ │ ├── build.py
│ │ │ ├── cache.py
│ │ │ ├── completion.py
│ │ │ ├── config.py
│ │ │ ├── export.py
│ │ │ ├── fix/
│ │ │ │ ├── __init__.py
│ │ │ │ └── fixers.py
│ │ │ ├── import_cmd.py
│ │ │ ├── info.py
│ │ │ ├── init.py
│ │ │ ├── install.py
│ │ │ ├── list.py
│ │ │ ├── lock.py
│ │ │ ├── new.py
│ │ │ ├── outdated.py
│ │ │ ├── publish/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── package.py
│ │ │ │ └── repository.py
│ │ │ ├── python.py
│ │ │ ├── remove.py
│ │ │ ├── run.py
│ │ │ ├── search.py
│ │ │ ├── self_cmd.py
│ │ │ ├── show.py
│ │ │ ├── sync.py
│ │ │ ├── update.py
│ │ │ ├── use.py
│ │ │ └── venv/
│ │ │ ├── __init__.py
│ │ │ ├── activate.py
│ │ │ ├── backends.py
│ │ │ ├── create.py
│ │ │ ├── list.py
│ │ │ ├── purge.py
│ │ │ ├── remove.py
│ │ │ └── utils.py
│ │ ├── completions/
│ │ │ ├── __init__.py
│ │ │ ├── pdm.bash
│ │ │ ├── pdm.fish
│ │ │ ├── pdm.ps1
│ │ │ └── pdm.zsh
│ │ ├── filters.py
│ │ ├── hooks.py
│ │ ├── options.py
│ │ ├── templates/
│ │ │ ├── __init__.py
│ │ │ ├── default/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── README.md
│ │ │ │ ├── __init__.py
│ │ │ │ ├── pyproject.toml
│ │ │ │ ├── src/
│ │ │ │ │ └── example_package/
│ │ │ │ │ └── __init__.py
│ │ │ │ └── tests/
│ │ │ │ └── __init__.py
│ │ │ └── minimal/
│ │ │ ├── .gitignore
│ │ │ ├── __init__.py
│ │ │ └── pyproject.toml
│ │ └── utils.py
│ ├── compat.py
│ ├── core.py
│ ├── environments/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── local.py
│ │ └── python.py
│ ├── exceptions.py
│ ├── formats/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── flit.py
│ │ ├── pipfile.py
│ │ ├── poetry.py
│ │ ├── pylock.py
│ │ ├── requirements.py
│ │ ├── setup_py.py
│ │ └── uv.py
│ ├── installers/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── core.py
│ │ ├── installers.py
│ │ ├── manager.py
│ │ ├── synchronizers.py
│ │ ├── uninstallers.py
│ │ └── uv.py
│ ├── misc/
│ │ ├── __init__.py
│ │ └── sysconfig_patcher.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── auth.py
│ │ ├── backends.py
│ │ ├── cached_package.py
│ │ ├── caches.py
│ │ ├── candidates.py
│ │ ├── finder.py
│ │ ├── in_process/
│ │ │ ├── __init__.py
│ │ │ ├── env_spec.py
│ │ │ ├── parse_setup.py
│ │ │ └── sysconfig_get_paths.py
│ │ ├── markers.py
│ │ ├── project_info.py
│ │ ├── python.py
│ │ ├── python_max_versions.json
│ │ ├── reporter.py
│ │ ├── repositories/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── lock.py
│ │ │ └── pypi.py
│ │ ├── requirements.py
│ │ ├── search.py
│ │ ├── session.py
│ │ ├── setup.py
│ │ ├── specifiers.py
│ │ ├── venv.py
│ │ ├── versions.py
│ │ └── working_set.py
│ ├── pep582/
│ │ ├── __init__.py
│ │ └── sitecustomize.py
│ ├── project/
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── core.py
│ │ ├── lockfile/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── pdmlock.py
│ │ │ └── pylock.py
│ │ ├── project_file.py
│ │ └── toml_file.py
│ ├── py.typed
│ ├── pytest.py
│ ├── resolver/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── graph.py
│ │ ├── providers.py
│ │ ├── python.py
│ │ ├── reporters.py
│ │ ├── resolvelib.py
│ │ └── uv.py
│ ├── signals.py
│ ├── termui.py
│ └── utils.py
├── tasks/
│ ├── complete.py
│ ├── max_versions.py
│ └── release.py
├── tests/
│ ├── __init__.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_add.py
│ │ ├── test_build.py
│ │ ├── test_cache.py
│ │ ├── test_completion.py
│ │ ├── test_config.py
│ │ ├── test_fix.py
│ │ ├── test_hooks.py
│ │ ├── test_info.py
│ │ ├── test_init.py
│ │ ├── test_install.py
│ │ ├── test_list.py
│ │ ├── test_lock.py
│ │ ├── test_others.py
│ │ ├── test_outdated.py
│ │ ├── test_publish.py
│ │ ├── test_python.py
│ │ ├── test_remove.py
│ │ ├── test_run.py
│ │ ├── test_search.py
│ │ ├── test_self_command.py
│ │ ├── test_show.py
│ │ ├── test_template.py
│ │ ├── test_update.py
│ │ ├── test_use.py
│ │ ├── test_utils.py
│ │ └── test_venv.py
│ ├── conftest.py
│ ├── environments/
│ │ ├── test_environment.py
│ │ └── test_shebangs.py
│ ├── fixtures/
│ │ ├── Pipfile
│ │ ├── __init__.py
│ │ ├── artifacts/
│ │ │ ├── PyFunctional-1.4.3-py3-none-any.whl
│ │ │ ├── celery-4.4.2-py2.py3-none-any.whl
│ │ │ ├── demo-0.0.1-cp36-cp36m-win_amd64.whl
│ │ │ ├── demo-0.0.1-py2.py3-none-any.whl
│ │ │ ├── editables-0.2-py3-none-any.whl
│ │ │ ├── first-2.0.2-py2.py3-none-any.whl
│ │ │ ├── flit_core-3.6.0-py3-none-any.whl
│ │ │ ├── future_fstrings-1.2.0-py2.py3-none-any.whl
│ │ │ ├── importlib_metadata-4.8.3-py3-none-any.whl
│ │ │ ├── jmespath-0.10.0-py2.py3-none-any.whl
│ │ │ ├── pdm_backend-2.1.4-py3-none-any.whl
│ │ │ ├── pdm_hello-0.1.0-py3-none-any.whl
│ │ │ ├── pdm_hello-0.1.0-py3-none-win_amd64.whl
│ │ │ ├── pdm_pep517-1.0.0-py3-none-any.whl
│ │ │ ├── poetry_core-1.3.2-py3-none-any.whl
│ │ │ ├── setuptools-68.0.0-py3-none-any.whl
│ │ │ ├── typing_extensions-4.4.0-py3-none-any.whl
│ │ │ ├── wheel-0.37.1-py2.py3-none-any.whl
│ │ │ ├── zipp-3.6.0-py3-none-any.whl
│ │ │ └── zipp-3.7.0-py3-none-any.whl
│ │ ├── constraints.txt
│ │ ├── index/
│ │ │ ├── demo.html
│ │ │ ├── future-fstrings.html
│ │ │ ├── pep345-legacy.html
│ │ │ └── wheel.html
│ │ ├── json/
│ │ │ └── zipp.json
│ │ ├── poetry-error.toml
│ │ ├── poetry-new.toml
│ │ ├── projects/
│ │ │ ├── __init__.py
│ │ │ ├── demo/
│ │ │ │ ├── demo.py
│ │ │ │ ├── pylock.toml
│ │ │ │ └── pyproject.toml
│ │ │ ├── demo-#-with-hash/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── demo-combined-extras/
│ │ │ │ ├── demo.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── demo-failure/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── demo-failure-no-dep/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── demo-module/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── bar_module.py
│ │ │ │ ├── foo_module.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── demo-package/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── data_out.json
│ │ │ │ ├── my_package/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── data.json
│ │ │ │ ├── pyproject.toml
│ │ │ │ ├── requirements.ini
│ │ │ │ ├── requirements.txt
│ │ │ │ ├── requirements_simple.txt
│ │ │ │ ├── setup.txt
│ │ │ │ └── single_module.py
│ │ │ ├── demo-package-has-dep-with-extras/
│ │ │ │ ├── pyproject.toml
│ │ │ │ └── requirements.txt
│ │ │ ├── demo-parent-package/
│ │ │ │ ├── README.md
│ │ │ │ ├── package-a/
│ │ │ │ │ ├── foo.py
│ │ │ │ │ └── setup.py
│ │ │ │ └── package-b/
│ │ │ │ ├── bar.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── demo-prerelease/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── demo-src-package/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── data_out.json
│ │ │ │ ├── pyproject.toml
│ │ │ │ ├── single_module.py
│ │ │ │ └── src/
│ │ │ │ └── my_package/
│ │ │ │ ├── __init__.py
│ │ │ │ └── data.json
│ │ │ ├── demo_extras/
│ │ │ │ ├── demo.py
│ │ │ │ └── setup.py
│ │ │ ├── flit-demo/
│ │ │ │ ├── README.rst
│ │ │ │ ├── doc/
│ │ │ │ │ └── index.html
│ │ │ │ ├── flit.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── poetry-demo/
│ │ │ │ ├── mylib.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── poetry-with-circular-dep/
│ │ │ │ ├── packages/
│ │ │ │ │ └── child/
│ │ │ │ │ ├── child/
│ │ │ │ │ │ └── __init__.py
│ │ │ │ │ └── pyproject.toml
│ │ │ │ ├── parent/
│ │ │ │ │ └── __init__.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── test-hatch-static/
│ │ │ │ ├── README.md
│ │ │ │ └── pyproject.toml
│ │ │ ├── test-monorepo/
│ │ │ │ ├── README.md
│ │ │ │ ├── core/
│ │ │ │ │ ├── core.py
│ │ │ │ │ └── pyproject.toml
│ │ │ │ ├── package_a/
│ │ │ │ │ ├── alice.py
│ │ │ │ │ └── pyproject.toml
│ │ │ │ ├── package_b/
│ │ │ │ │ ├── bob.py
│ │ │ │ │ └── pyproject.toml
│ │ │ │ └── pyproject.toml
│ │ │ ├── test-package-type-fixer/
│ │ │ │ ├── pyproject.toml
│ │ │ │ └── src/
│ │ │ │ └── test_package_type_fixer/
│ │ │ │ └── __init__.py
│ │ │ ├── test-plugin/
│ │ │ │ ├── hello.py
│ │ │ │ └── setup.py
│ │ │ ├── test-plugin-pdm/
│ │ │ │ ├── hello.py
│ │ │ │ └── pyproject.toml
│ │ │ ├── test-removal/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bar.py
│ │ │ │ ├── foo.py
│ │ │ │ └── subdir/
│ │ │ │ └── __init__.py
│ │ │ └── test-setuptools/
│ │ │ ├── AUTHORS
│ │ │ ├── README.md
│ │ │ ├── mymodule.py
│ │ │ ├── setup.cfg
│ │ │ └── setup.py
│ │ ├── pypi.json
│ │ ├── pyproject.toml
│ │ ├── requirements-include.txt
│ │ └── requirements.txt
│ ├── models/
│ │ ├── __init__.py
│ │ ├── test_backends.py
│ │ ├── test_candidates.py
│ │ ├── test_marker.py
│ │ ├── test_requirements.py
│ │ ├── test_session.py
│ │ ├── test_setup_parsing.py
│ │ ├── test_setup_parsing_extra.py
│ │ ├── test_specifiers.py
│ │ └── test_versions.py
│ ├── resolver/
│ │ ├── __init__.py
│ │ ├── test_graph.py
│ │ ├── test_resolve.py
│ │ └── test_uv_resolver.py
│ ├── test_formats.py
│ ├── test_installer.py
│ ├── test_integration.py
│ ├── test_plugin.py
│ ├── test_project.py
│ ├── test_signals.py
│ └── test_utils.py
├── tox.ini
└── typings/
└── shellingham.pyi
Showing preview only (215K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2279 symbols across 173 files)
FILE: docs/assets/extra.js
function loadExpansions (line 6) | function loadExpansions() {
function setExpansion (line 18) | function setExpansion() {
FILE: install-pdm.py
function _call_subprocess (line 38) | def _call_subprocess(args: list[str]) -> int:
function _echo (line 47) | def _echo(text: str) -> None:
function _get_win_folder_with_ctypes (line 54) | def _get_win_folder_with_ctypes(csidl_name: str) -> str:
function _get_win_folder_from_registry (line 80) | def _get_win_folder_from_registry(csidl_name: str) -> str:
function _remove_path_windows (line 105) | def _remove_path_windows(target: Path) -> None:
function _add_to_path (line 122) | def _add_to_path(target: Path) -> None:
function support_ansi (line 154) | def support_ansi() -> bool:
function colored (line 172) | def colored(color: str, text: str, bold: bool = False) -> str:
class Installer (line 183) | class Installer:
method __post_init__ (line 192) | def __post_init__(self):
method _decide_path (line 196) | def _decide_path(self) -> Path:
method _make_env (line 212) | def _make_env(self) -> Path:
method _install (line 242) | def _install(self, venv_path: Path) -> None:
method _make_bin (line 282) | def _make_bin(self, venv_path: Path) -> Path:
method _post_install (line 313) | def _post_install(self, venv_path: Path, bin_path: Path) -> None:
method _write_output (line 338) | def _write_output(self, venv_path: Path, script: Path, pdm_version: st...
method install (line 351) | def install(self) -> None:
method uninstall (line 357) | def uninstall(self) -> None:
function main (line 394) | def main():
FILE: src/pdm/__version__.py
function read_version (line 4) | def read_version() -> str:
FILE: src/pdm/_types.py
function _normalize_pattern (line 11) | def _normalize_pattern(pattern: str) -> str:
class RepositoryConfig (line 16) | class RepositoryConfig:
method __post_init__ (line 33) | def __post_init__(self) -> None:
method populate_keyring_auth (line 37) | def populate_keyring_auth(self) -> None:
method passive_update (line 46) | def passive_update(self, other: RepositoryConfig | None = None, **kwar...
method __rich__ (line 57) | def __rich__(self) -> str:
method url_with_credentials (line 76) | def url_with_credentials(self) -> HiddenText:
class SearchResult (line 96) | class SearchResult(NamedTuple):
class Comparable (line 108) | class Comparable(Protocol):
method __lt__ (line 109) | def __lt__(self, __other: Any) -> bool: ...
class Spinner (line 113) | class Spinner(Protocol):
method update (line 114) | def update(self, text: str) -> None: ...
method __enter__ (line 116) | def __enter__(self: SpinnerT) -> SpinnerT: ...
method __exit__ (line 118) | def __exit__(self, *args: Any) -> None: ...
class RichProtocol (line 120) | class RichProtocol(Protocol):
method __rich__ (line 121) | def __rich__(self) -> str: ...
class FileHash (line 123) | class FileHash(TypedDict, total=False):
class NotSetType (line 129) | class NotSetType:
class HiddenText (line 137) | class HiddenText:
method __str__ (line 141) | def __str__(self) -> str:
method __repr__ (line 144) | def __repr__(self) -> str:
FILE: src/pdm/builders/base.py
class LoggerWrapper (line 39) | class LoggerWrapper(threading.Thread):
method __init__ (line 45) | def __init__(self, logger: Logger, level: int) -> None:
method fileno (line 58) | def fileno(self) -> int:
method remove_newline (line 62) | def remove_newline(msg: str) -> str:
method run (line 65) | def run(self) -> None:
method _write (line 70) | def _write(self, message: str) -> None:
method stop (line 76) | def stop(self) -> None:
function wrap_error (line 81) | def wrap_error(func: Callable[P, R]) -> Callable[P, R]:
function build_error (line 91) | def build_error(e: subprocess.CalledProcessError) -> BuildError:
function log_subprocessor (line 109) | def log_subprocessor(
class _Prefix (line 133) | class _Prefix:
method __init__ (line 134) | def __init__(self, executable: str, shared: str, overlay: str) -> None:
class EnvBuilder (line 170) | class EnvBuilder:
method get_shared_env (line 186) | def get_shared_env(self, key: int) -> str:
method get_overlay_env (line 194) | def get_overlay_env(self, key: str) -> str:
method __init__ (line 199) | def __init__(self, src_dir: str | Path, environment: BaseEnvironment) ...
method init_build_system (line 227) | def init_build_system(self, build_system: dict[str, Any]) -> None:
method _env_vars (line 250) | def _env_vars(self) -> dict[str, str]:
method subprocess_runner (line 275) | def subprocess_runner(
method check_requirements (line 283) | def check_requirements(self, reqs: Iterable[str]) -> Iterable[Requirem...
method install (line 314) | def install(self, requirements: Iterable[str], shared: bool = False) -...
method prepare_metadata (line 332) | def prepare_metadata(self, out_dir: str) -> str:
method build (line 339) | def build(self, out_dir: str, metadata_directory: str | None = None) -...
FILE: src/pdm/builders/editable.py
class EditableBuilder (line 8) | class EditableBuilder(EnvBuilder):
method prepare_metadata (line 12) | def prepare_metadata(self, out_dir: str) -> str:
method build (line 21) | def build(self, out_dir: str, metadata_directory: str | None = None) -...
FILE: src/pdm/builders/sdist.py
class SdistBuilder (line 8) | class SdistBuilder(EnvBuilder):
method build (line 12) | def build(self, out_dir: str, metadata_directory: str | None = None) -...
FILE: src/pdm/builders/wheel.py
class WheelBuilder (line 8) | class WheelBuilder(EnvBuilder):
method prepare_metadata (line 12) | def prepare_metadata(self, out_dir: str) -> str:
method build (line 21) | def build(self, out_dir: str, metadata_directory: str | None = None) -...
FILE: src/pdm/cli/actions.py
function do_lock (line 40) | def do_lock(
function resolve_from_lockfile (line 173) | def resolve_from_lockfile(
function resolve_candidates_from_lockfile (line 239) | def resolve_candidates_from_lockfile(
function check_lockfile (line 252) | def check_lockfile(project: Project, raise_not_exist: bool = True) -> st...
function do_sync (line 275) | def do_sync(
function ask_for_import (line 319) | def ask_for_import(project: Project) -> None:
function print_pep582_command (line 342) | def print_pep582_command(project: Project, shell: str = "AUTO") -> None:
function get_latest_pdm_version_from_pypi (line 391) | def get_latest_pdm_version_from_pypi(project: Project, prereleases: bool...
function get_latest_version (line 399) | def get_latest_version(project: Project, expire_after: int = 7 * 24 * 36...
function check_update (line 422) | def check_update(project: Project) -> None: # pragma: no cover
FILE: src/pdm/cli/commands/add.py
class Command (line 32) | class Command(BaseCommand):
method add_arguments (line 51) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 68) | def handle(self, project: Project, options: argparse.Namespace) -> None:
method do_add (line 89) | def do_add(
FILE: src/pdm/cli/commands/base.py
class BaseCommand (line 13) | class BaseCommand:
method init_parser (line 25) | def init_parser(cls: type[C], parser: argparse.ArgumentParser) -> C:
method register_to (line 33) | def register_to(cls, subparsers: _SubParsersAction, name: str | None =...
method add_arguments (line 54) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 58) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/build.py
class Command (line 24) | class Command(BaseCommand):
method do_build (line 30) | def do_build(
method add_arguments (line 114) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 138) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/cache.py
class Command (line 13) | class Command(BaseCommand):
method add_arguments (line 18) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 27) | def handle(self, project: Project, options: argparse.Namespace) -> None:
function file_size (line 31) | def file_size(file: Path) -> int:
function find_files (line 37) | def find_files(parent: Path, pattern: str) -> Iterable[Path]:
function directory_size (line 43) | def directory_size(directory: Path) -> int:
function format_size (line 47) | def format_size(size: float) -> str:
function remove_cache_files (line 58) | def remove_cache_files(project: Project, pattern: str) -> None:
class ClearCommand (line 74) | class ClearCommand(BaseCommand):
method add_arguments (line 80) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method _clear_files (line 89) | def _clear_files(root: Path) -> int:
method handle (line 95) | def handle(self, project: Project, options: argparse.Namespace) -> None:
class RemoveCommand (line 120) | class RemoveCommand(BaseCommand):
method add_arguments (line 125) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 128) | def handle(self, project: Project, options: argparse.Namespace) -> None:
class ListCommand (line 132) | class ListCommand(BaseCommand):
method add_arguments (line 137) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 140) | def handle(self, project: Project, options: argparse.Namespace) -> None:
class InfoCommand (line 147) | class InfoCommand(BaseCommand):
method handle (line 152) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/completion.py
class Command (line 12) | class Command(BaseCommand):
method add_arguments (line 18) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 25) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/config.py
class Command (line 14) | class Command(BaseCommand):
method add_arguments (line 19) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method get_editor (line 37) | def get_editor() -> str:
method edit_file (line 49) | def edit_file(self, path: Path) -> None:
method handle (line 58) | def handle(self, project: Project, options: argparse.Namespace) -> None:
method _get_config (line 78) | def _get_config(self, project: Project, options: argparse.Namespace) -...
method _set_config (line 96) | def _set_config(self, project: Project, options: argparse.Namespace) -...
method _show_config (line 104) | def _show_config(self, config: Mapping[str, Any], supersedes: Mapping[...
method _list_config (line 151) | def _list_config(self, project: Project, options: argparse.Namespace) ...
method _delete_config (line 176) | def _delete_config(self, project: Project, options: argparse.Namespace...
FILE: src/pdm/cli/commands/export.py
class Command (line 21) | class Command(BaseCommand):
method add_arguments (line 24) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 69) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/fix/__init__.py
class Command (line 12) | class Command(BaseCommand):
method add_arguments (line 15) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method find_problems (line 20) | def find_problems(project: Project) -> list[tuple[str, BaseFixer]]:
method check_problems (line 29) | def check_problems(project: Project, strict: bool = True) -> None:
method get_fixers (line 50) | def get_fixers(project: Project) -> list[BaseFixer]:
method handle (line 54) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/fix/fixers.py
class BaseFixer (line 10) | class BaseFixer(abc.ABC):
method __init__ (line 18) | def __init__(self, project: Project) -> None:
method log (line 21) | def log(self, message: str, verbosity: Verbosity = Verbosity.DETAIL) -...
method get_message (line 25) | def get_message(self) -> str:
method fix (line 29) | def fix(self) -> None:
method check (line 33) | def check(self) -> bool:
class ProjectConfigFixer (line 37) | class ProjectConfigFixer(BaseFixer):
method get_message (line 42) | def get_message(self) -> str:
method _fix_gitignore (line 48) | def _fix_gitignore(self) -> None:
method fix (line 57) | def fix(self) -> None:
method check (line 69) | def check(self) -> bool:
class PackageTypeFixer (line 73) | class PackageTypeFixer(BaseFixer): # pragma: no cover
method get_message (line 76) | def get_message(self) -> str:
method check (line 84) | def check(self) -> bool:
method fix (line 87) | def fix(self) -> None:
class LockStrategyFixer (line 105) | class LockStrategyFixer(BaseFixer):
method get_message (line 108) | def get_message(self) -> str:
method check (line 111) | def check(self) -> bool:
method fix (line 122) | def fix(self) -> None:
FILE: src/pdm/cli/commands/import_cmd.py
class Command (line 11) | class Command(BaseCommand):
method add_arguments (line 16) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 34) | def handle(self, project: Project, options: argparse.Namespace) -> None:
method do_import (line 38) | def do_import(
FILE: src/pdm/cli/commands/info.py
class Command (line 12) | class Command(BaseCommand):
method add_arguments (line 15) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 30) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/init.py
class Command (line 26) | class Command(BaseCommand):
method __init__ (line 36) | def __init__(self) -> None:
method initialize_git (line 39) | def initialize_git(self, project: Project) -> None:
method do_init (line 65) | def do_init(self, project: Project, options: argparse.Namespace) -> None:
method _init_copier (line 81) | def _init_copier(self, project: Project, options: argparse.Namespace) ...
method _init_cookiecutter (line 97) | def _init_cookiecutter(self, project: Project, options: argparse.Names...
method _init_builtin (line 114) | def _init_builtin(self, project: Project, options: argparse.Namespace)...
method set_interactive (line 123) | def set_interactive(self, value: bool) -> None:
method ask (line 126) | def ask(self, question: str, default: str) -> str:
method ask_project (line 131) | def ask_project(self, project: Project) -> str:
method get_metadata_from_input (line 143) | def get_metadata_from_input(self, project: Project, options: argparse....
method add_arguments (line 213) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method set_python (line 262) | def set_python(self, project: Project, python: str | None, hooks: Hook...
method handle (line 283) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/install.py
class Command (line 23) | class Command(BaseCommand):
method add_arguments (line 38) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method install_plugins (line 46) | def install_plugins(self, project: Project) -> None:
method handle (line 69) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/list.py
class Command (line 32) | class Command(BaseCommand):
method add_arguments (line 37) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method filter_by_patterns (line 111) | def filter_by_patterns(
method handle (line 119) | def handle(self, project: Project, options: argparse.Namespace) -> None:
method handle_freeze (line 186) | def handle_freeze(self, project: Project, options: argparse.Namespace)...
method handle_graph (line 213) | def handle_graph(
method handle_list (line 228) | def handle_list(
function parse_comma_separated_string (line 292) | def parse_comma_separated_string(
class Listable (line 310) | class Listable:
method __init__ (line 320) | def __init__(self, dist: im.Distribution, groups: set[str]):
method location (line 352) | def location(self) -> str:
method license_files (line 355) | def license_files(self) -> list[im.PackagePath]:
method __getitem__ (line 378) | def __getitem__(self, field: str) -> str:
method json (line 383) | def json(self, fields: Sequence[str]) -> dict:
method rich (line 386) | def rich(self, fields: Sequence[str]) -> Sequence[str]:
method markdown (line 396) | def markdown(self, fields: Sequence[str]) -> str:
FILE: src/pdm/cli/commands/lock.py
class Command (line 26) | class Command(BaseCommand):
method add_arguments (line 40) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 86) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/new.py
class Command (line 9) | class Command(InitCommand):
method add_arguments (line 16) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 20) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/outdated.py
class ListPackage (line 25) | class ListPackage:
function _find_first_diff (line 34) | def _find_first_diff(a: str, b: str) -> int:
class Command (line 43) | class Command(BaseCommand):
method add_arguments (line 46) | def add_arguments(self, parser: ArgumentParser) -> None:
method _match_pattern (line 54) | def _match_pattern(name: str, patterns: list[str]) -> bool:
method _populate_latest_version (line 58) | def _populate_latest_version(finder: PackageFinder, package: ListPacka...
method _format_json (line 64) | def _format_json(packages: list[ListPackage]) -> str:
method _render_version (line 68) | def _render_version(version: str, base_version: str) -> str:
method handle (line 91) | def handle(self, project: Project, options: Namespace) -> None:
FILE: src/pdm/cli/commands/publish/__init__.py
class Command (line 22) | class Command(BaseCommand):
method add_arguments (line 27) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method _make_package (line 88) | def _make_package(filename: str, signatures: dict[str, str], options: ...
method _skip_upload (line 97) | def _skip_upload(response: Response) -> bool:
method _check_response (line 120) | def _check_response(response: Response) -> None:
method get_repository (line 143) | def get_repository(project: Project, options: argparse.Namespace) -> R...
method handle (line 173) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/publish/package.py
function parse_metadata (line 32) | def parse_metadata(fp: IO[bytes]) -> email.message.Message:
class PackageFile (line 41) | class PackageFile:
method __post_init__ (line 53) | def __post_init__(self) -> None:
method get_hashes (line 57) | def get_hashes(self) -> dict[str, str]:
method from_filename (line 74) | def from_filename(cls, filename: str, comment: str | None) -> PackageF...
method read_metadata_from_tar (line 98) | def read_metadata_from_tar(filename: str) -> email.message.Message:
method read_metadata_from_zip (line 120) | def read_metadata_from_zip(filename: str) -> email.message.Message:
method read_metadata_from_wheel (line 135) | def read_metadata_from_wheel(filename: str) -> email.message.Message:
method add_gpg_signature (line 144) | def add_gpg_signature(self, filename: str, signature_name: str) -> None:
method sign (line 150) | def sign(self, identity: str | None) -> None:
method _run_gpg (line 160) | def _run_gpg(gpg_args: list[str]) -> None:
method metadata_dict (line 178) | def metadata_dict(self) -> dict[str, Any]:
FILE: src/pdm/cli/commands/publish/repository.py
class CallbackWrapperStream (line 30) | class CallbackWrapperStream(httpx.SyncByteStream):
method __init__ (line 31) | def __init__(self, stream: httpx.SyncByteStream, callback: Callable[[S...
method __iter__ (line 36) | def __iter__(self) -> Iterable[bytes]:
class Repository (line 43) | class Repository:
method __init__ (line 44) | def __init__(self, project: Project, config: RepositoryConfig) -> None:
method _ensure_credentials (line 53) | def _ensure_credentials(self, username: str | None, password: str | No...
method _get_pypi_token_via_oidc (line 78) | def _get_pypi_token_via_oidc(self) -> str | None:
method _prompt_for_credentials (line 110) | def _prompt_for_credentials(self, service: str, username: str | None) ...
method _save_credentials (line 122) | def _save_credentials(self, service: str, username: str, password: str...
method get_release_urls (line 128) | def get_release_urls(self, packages: list[PackageFile]) -> Iterable[str]:
method upload (line 137) | def upload(self, package: PackageFile) -> httpx.Response:
FILE: src/pdm/cli/commands/python.py
class Command (line 26) | class Command(BaseCommand):
method add_arguments (line 31) | def add_arguments(self, parser: ArgumentParser) -> None:
method register_to (line 41) | def register_to(cls, subparsers: _SubParsersAction, name: str | None =...
method handle (line 44) | def handle(self, project: Project, options: Namespace) -> None:
class ListCommand (line 48) | class ListCommand(BaseCommand):
method handle (line 53) | def handle(self, project: Project, options: Namespace) -> None:
class RemoveCommand (line 62) | class RemoveCommand(BaseCommand):
method add_arguments (line 67) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 70) | def handle(self, project: Project, options: Namespace) -> None:
class InstallCommand (line 98) | class InstallCommand(BaseCommand):
method add_arguments (line 103) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 118) | def handle(self, project: Project, options: Namespace) -> None:
method install_python (line 135) | def install_python(project: Project, request: str) -> PythonInfo:
class LinkCommand (line 197) | class LinkCommand(BaseCommand):
method add_arguments (line 202) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 206) | def handle(self, project: Project, options: Namespace) -> None:
class FindCommand (line 225) | class FindCommand(BaseCommand):
method add_arguments (line 230) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 234) | def handle(self, project: Project, options: Namespace) -> None:
FILE: src/pdm/cli/commands/remove.py
class Command (line 27) | class Command(BaseCommand):
method add_arguments (line 41) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 59) | def handle(self, project: Project, options: argparse.Namespace) -> None:
method do_remove (line 73) | def do_remove(
FILE: src/pdm/cli/commands/run.py
class EnvFileOptions (line 34) | class EnvFileOptions(TypedDict, total=True):
class TaskOptions (line 37) | class TaskOptions(TypedDict, total=False):
function merge_options (line 46) | def merge_options(*options: TaskOptions | None) -> TaskOptions:
function _interpolate_args (line 64) | def _interpolate_args(script: str, args: Sequence[str]) -> tuple[str, bo...
function _interpolate_pdm (line 76) | def _interpolate_pdm(script: str) -> str:
function interpolate (line 85) | def interpolate(script: str, args: Sequence[str]) -> tuple[str, bool]:
function read_script_metadata (line 96) | def read_script_metadata(script: str, section: str) -> dict[str, Any] | ...
class Task (line 116) | class Task(NamedTuple):
method __str__ (line 122) | def __str__(self) -> str:
method short_description (line 126) | def short_description(self) -> str:
class TaskRunner (line 138) | class TaskRunner:
method __init__ (line 144) | def __init__(self, project: Project, hooks: HookManager) -> None:
method _get_script_env (line 154) | def _get_script_env(self, script_file: str) -> BaseEnvironment:
method get_task (line 188) | def get_task(self, script_name: str) -> Task | None:
method expand_command (line 213) | def expand_command(self, env: BaseEnvironment, command: str) -> str:
method _run_process (line 225) | def _run_process(
method run_task (line 305) | def run_task(
method display_task (line 371) | def display_task(self, task: Task, args: Sequence[str]) -> None:
method run (line 384) | def run(
method show_list (line 421) | def show_list(self) -> None:
method as_json (line 440) | def as_json(self) -> dict[str, Any]:
function _fix_env_file (line 460) | def _fix_env_file(data: dict[str, Any]) -> dict[str, Any]:
class Command (line 468) | class Command(BaseCommand):
method add_arguments (line 473) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method get_runner (line 504) | def get_runner(self, project: Project, hooks: HookManager, options: ar...
method handle (line 515) | def handle(self, project: Project, options: argparse.Namespace) -> None:
function run_script_if_present (line 531) | def run_script_if_present(script_name: str, sender: Project, hooks: Hook...
FILE: src/pdm/cli/commands/search.py
function print_results (line 15) | def print_results(
class Command (line 45) | class Command(BaseCommand):
method add_arguments (line 50) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 53) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/self_cmd.py
function list_distributions (line 24) | def list_distributions(plugin_only: bool = False) -> list[Distribution]:
function run_pip (line 33) | def run_pip(project: Project, args: list[str]) -> subprocess.CompletedPr...
class Command (line 58) | class Command(BaseCommand):
method register_to (line 65) | def register_to(
method add_arguments (line 73) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 83) | def handle(self, project: Project, options: argparse.Namespace) -> None:
class ListCommand (line 87) | class ListCommand(BaseCommand):
method add_arguments (line 93) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 96) | def handle(self, project: Project, options: argparse.Namespace) -> None:
class AddCommand (line 116) | class AddCommand(BaseCommand):
method add_arguments (line 122) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 134) | def handle(self, project: Project, options: argparse.Namespace) -> None:
class RemoveCommand (line 147) | class RemoveCommand(BaseCommand):
method add_arguments (line 153) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method _resolve_dependencies_to_remove (line 162) | def _resolve_dependencies_to_remove(self, packages: list[str]) -> list...
method handle (line 189) | def handle(self, project: Project, options: argparse.Namespace) -> None:
class UpdateCommand (line 208) | class UpdateCommand(BaseCommand):
method add_arguments (line 214) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 238) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/show.py
function filter_stable (line 19) | def filter_stable(package: Package) -> bool:
class Command (line 24) | class Command(BaseCommand):
method add_arguments (line 29) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 40) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/sync.py
class Command (line 19) | class Command(BaseCommand):
method add_arguments (line 33) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 41) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/update.py
class Command (line 32) | class Command(BaseCommand):
method add_arguments (line 50) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method handle (line 74) | def handle(self, project: Project, options: argparse.Namespace) -> None:
method do_update (line 93) | def do_update(
FILE: src/pdm/cli/commands/use.py
class Command (line 17) | class Command(BaseCommand):
method add_arguments (line 20) | def add_arguments(self, parser: argparse.ArgumentParser) -> None:
method select_python (line 56) | def select_python(
method do_use (line 136) | def do_use(
method handle (line 205) | def handle(self, project: Project, options: argparse.Namespace) -> None:
FILE: src/pdm/cli/commands/venv/__init__.py
class Command (line 20) | class Command(BaseCommand):
method add_arguments (line 26) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 38) | def handle(self, project: Project, options: Namespace) -> None:
FILE: src/pdm/cli/commands/venv/activate.py
class ActivateCommand (line 21) | class ActivateCommand(BaseCommand):
method add_arguments (line 26) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 29) | def handle(self, project: Project, options: Namespace) -> None:
method get_activate_command (line 50) | def get_activate_command(self, venv: VirtualEnv) -> str: # pragma: no...
method quote (line 72) | def quote(command: str, shell: str) -> str:
FILE: src/pdm/cli/commands/venv/backends.py
class VirtualenvCreateError (line 23) | class VirtualenvCreateError(ProjectError):
class Backend (line 27) | class Backend(abc.ABC):
method __init__ (line 30) | def __init__(self, project: Project, python: str | None) -> None:
method pip_args (line 35) | def pip_args(self, with_pip: bool) -> Iterable[str]:
method _resolved_interpreter (line 39) | def _resolved_interpreter(self) -> PythonInfo:
method ident (line 60) | def ident(self) -> str:
method subprocess_call (line 70) | def subprocess_call(self, cmd: list[str], **kwargs: Any) -> None:
method _ensure_clean (line 84) | def _ensure_clean(self, location: Path, force: bool = False) -> None:
method get_location (line 105) | def get_location(self, name: str | None = None, venv_name: str | None ...
method create (line 115) | def create(
method perform_create (line 137) | def perform_create(self, location: Path, args: tuple[str, ...], prompt...
class VirtualenvBackend (line 141) | class VirtualenvBackend(Backend):
method pip_args (line 142) | def pip_args(self, with_pip: bool) -> Iterable[str]:
method perform_create (line 147) | def perform_create(self, location: Path, args: tuple[str, ...], prompt...
class VenvBackend (line 162) | class VenvBackend(VirtualenvBackend):
method pip_args (line 163) | def pip_args(self, with_pip: bool) -> Iterable[str]:
method perform_create (line 168) | def perform_create(self, location: Path, args: tuple[str, ...], prompt...
class UvBackend (line 174) | class UvBackend(VirtualenvBackend):
method pip_args (line 175) | def pip_args(self, with_pip: bool) -> Iterable[str]:
method perform_create (line 180) | def perform_create(self, location: Path, args: tuple[str, ...], prompt...
class CondaBackend (line 194) | class CondaBackend(Backend):
method ident (line 196) | def ident(self) -> str:
method pip_args (line 203) | def pip_args(self, with_pip: bool) -> Iterable[str]:
method perform_create (line 208) | def perform_create(self, location: Path, args: tuple[str, ...], prompt...
FILE: src/pdm/cli/commands/venv/create.py
class CreateCommand (line 16) | class CreateCommand(BaseCommand):
method add_arguments (line 25) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 52) | def handle(self, project: Project, options: Namespace) -> None:
FILE: src/pdm/cli/commands/venv/list.py
class ListCommand (line 16) | class ListCommand(BaseCommand):
method handle (line 21) | def handle(self, project: Project, options: Namespace) -> None:
FILE: src/pdm/cli/commands/venv/purge.py
class PurgeCommand (line 18) | class PurgeCommand(BaseCommand):
method add_arguments (line 23) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 37) | def handle(self, project: Project, options: Namespace) -> None:
method del_all_venvs (line 66) | def del_all_venvs(self, project: Project) -> None:
FILE: src/pdm/cli/commands/venv/remove.py
class RemoveCommand (line 18) | class RemoveCommand(BaseCommand):
method add_arguments (line 23) | def add_arguments(self, parser: ArgumentParser) -> None:
method handle (line 32) | def handle(self, project: Project, options: Namespace) -> None:
FILE: src/pdm/cli/commands/venv/utils.py
function hash_path (line 25) | def hash_path(path: str) -> str:
function get_in_project_venv (line 30) | def get_in_project_venv(root: Path) -> VirtualEnv | None:
function get_venv_prefix (line 39) | def get_venv_prefix(project: Project) -> str:
function iter_venvs (line 46) | def iter_venvs(project: Project) -> Iterable[tuple[str, VirtualEnv]]:
function iter_central_venvs (line 60) | def iter_central_venvs(project: Project) -> Iterable[tuple[str, Path]]:
class VenvProvider (line 68) | class VenvProvider(BaseProvider):
method __init__ (line 71) | def __init__(self, project: Project) -> None:
method create (line 75) | def create(cls) -> Self | None:
method find_pythons (line 78) | def find_pythons(self) -> Iterable[PythonVersion]:
function get_venv_with_name (line 83) | def get_venv_with_name(project: Project, name: str) -> VirtualEnv:
FILE: src/pdm/cli/filters.py
class GroupSelection (line 16) | class GroupSelection:
method __init__ (line 17) | def __init__(
method from_options (line 37) | def from_options(cls, project: Project, options: argparse.Namespace) -...
method one (line 50) | def one(self) -> str:
method is_unset (line 58) | def is_unset(self) -> bool:
method all (line 61) | def all(self) -> list[str] | None:
method _translated_groups (line 72) | def _translated_groups(self) -> list[str]:
method validate (line 113) | def validate(self) -> None:
method __iter__ (line 118) | def __iter__(self) -> Iterator[str]:
method __contains__ (line 121) | def __contains__(self, group: str) -> bool:
FILE: src/pdm/cli/hooks.py
class HookManager (line 10) | class HookManager:
method __init__ (line 11) | def __init__(self, project: Project, skip: list[str] | None = None):
method skipping (line 16) | def skipping(self, *names: str) -> Generator[None]:
method skip_all (line 26) | def skip_all(self) -> bool:
method skip_pre (line 30) | def skip_pre(self) -> bool:
method skip_post (line 34) | def skip_post(self) -> bool:
method should_run (line 37) | def should_run(self, name: str) -> bool:
method try_emit (line 49) | def try_emit(self, name: str, **kwargs: Any) -> None:
FILE: src/pdm/cli/options.py
class ActionCallback (line 14) | class ActionCallback(Protocol):
method __call__ (line 15) | def __call__(
class Option (line 24) | class Option:
method __init__ (line 29) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method add_to_parser (line 33) | def add_to_parser(self, parser: argparse._ActionsContainer) -> None:
method add_to_group (line 36) | def add_to_group(self, group: argparse._ArgumentGroup) -> None:
method __call__ (line 39) | def __call__(self, func: ActionCallback) -> Option:
class CallbackAction (line 44) | class CallbackAction(argparse.Action):
method __init__ (line 45) | def __init__(self, *args: Any, callback: ActionCallback, **kwargs: Any...
method __call__ (line 49) | def __call__(
class ExtendMapAction (line 62) | class ExtendMapAction(argparse._AppendAction):
method __call__ (line 63) | def __call__(
class ArgumentGroup (line 82) | class ArgumentGroup(Option):
method __init__ (line 87) | def __init__(self, name: str, is_mutually_exclusive: bool = False, req...
method add_argument (line 93) | def add_argument(self, *args: Any, **kwargs: Any) -> None:
method add_to_parser (line 99) | def add_to_parser(self, parser: argparse._ActionsContainer) -> None:
method add_to_group (line 108) | def add_to_group(self, group: argparse._ArgumentGroup) -> None:
function split_lists (line 112) | def split_lists(separator: str) -> type[argparse.Action]:
function from_splitted_env (line 135) | def from_splitted_env(name: str, separator: str) -> list[str] | None:
function frozen_lockfile_option (line 184) | def frozen_lockfile_option(
function pep582_option (line 202) | def pep582_option(
function no_isolation_option (line 239) | def no_isolation_option(
function ignore_python_option (line 422) | def ignore_python_option(
function non_interactive_option (line 438) | def non_interactive_option(
FILE: src/pdm/cli/templates/__init__.py
class ProjectTemplate (line 25) | class ProjectTemplate:
method __init__ (line 28) | def __init__(self, path_or_url: str | None) -> None:
method __enter__ (line 31) | def __enter__(self) -> ProjectTemplate:
method __exit__ (line 36) | def __exit__(self, *args: Any) -> None:
method generate (line 39) | def generate(self, target_path: Path, metadata: dict[str, Any], overwr...
method prepare_template (line 84) | def prepare_template(self) -> None:
method mirror (line 96) | def mirror(
method _copy_package_file (line 116) | def _copy_package_file(src: Traversable, dst: Path) -> Path:
method _generate_pyproject (line 120) | def _generate_pyproject(self, path: Path, metadata: dict[str, Any]) ->...
method _prepare_package_template (line 147) | def _prepare_package_template(self, import_name: str) -> None:
method _prepare_git_template (line 152) | def _prepare_git_template(self, url: str) -> None:
method _prepare_local_template (line 165) | def _prepare_local_template(self, path: str) -> None:
FILE: src/pdm/cli/utils.py
class PdmFormatter (line 39) | class PdmFormatter(argparse.RawDescriptionHelpFormatter):
method start_section (line 40) | def start_section(self, heading: str | None) -> None:
method _format_usage (line 43) | def _format_usage(
method _format_action (line 59) | def _format_action(self, action: Action) -> str:
class ArgumentParser (line 123) | class ArgumentParser(argparse.ArgumentParser):
method __init__ (line 126) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method parse_known_args (line 137) | def parse_known_args(self, args: Any = None, namespace: Any = None) ->...
function format_similar_command (line 145) | def format_similar_command(root_command: str, commands: list[str], scrip...
class ErrorArgumentParser (line 165) | class ErrorArgumentParser(ArgumentParser):
method _parse_known_args (line 172) | def _parse_known_args(
class PackageNode (line 183) | class PackageNode:
method __repr__ (line 190) | def __repr__(self) -> str:
function build_dependency_graph (line 194) | def build_dependency_graph(
function specifier_from_requirement (line 257) | def specifier_from_requirement(requirement: Requirement) -> str:
function add_package_to_tree (line 261) | def add_package_to_tree(
function add_package_to_reverse_tree (line 297) | def add_package_to_reverse_tree(
function package_is_project (line 331) | def package_is_project(package: PackageNode, project: Project) -> bool:
function _format_forward_dependency_graph (line 335) | def _format_forward_dependency_graph(
function _format_reverse_dependency_graph (line 375) | def _format_reverse_dependency_graph(
function build_forward_dependency_json_subtree (line 400) | def build_forward_dependency_json_subtree(
function build_reverse_dependency_json_subtree (line 444) | def build_reverse_dependency_json_subtree(
function package_match_patterns (line 467) | def package_match_patterns(package: PackageNode, patterns: list[str]) ->...
function build_dependency_json_tree (line 471) | def build_dependency_json_tree(
function show_dependency_graph (line 502) | def show_dependency_graph(
function save_version_specifiers (line 528) | def save_version_specifiers(
function check_project_file (line 567) | def check_project_file(project: Project) -> None:
function find_importable_files (line 575) | def find_importable_files(project: Project) -> Iterable[tuple[str, Path]]:
function set_env_in_reg (line 589) | def set_env_in_reg(env_name: str, value: str) -> None:
function format_resolution_impossible (line 610) | def format_resolution_impossible(err: ResolutionImpossible) -> str:
function merge_dictionary (line 666) | def merge_dictionary(target: MutableMapping[Any, Any], input: Mapping[An...
function is_pipx_installation (line 684) | def is_pipx_installation() -> bool:
function is_homebrew_installation (line 688) | def is_homebrew_installation() -> bool:
function is_scoop_installation (line 692) | def is_scoop_installation() -> bool:
function get_dist_location (line 696) | def get_dist_location(dist: Distribution) -> str:
function get_pep582_path (line 709) | def get_pep582_path(project: Project) -> str:
function use_venv (line 725) | def use_venv(project: Project, name: str) -> None:
function normalize_pattern (line 734) | def normalize_pattern(pattern: str) -> str:
FILE: src/pdm/compat.py
class SupportsIdentify (line 12) | class SupportsIdentify(Protocol):
method identify (line 13) | def identify(self) -> str: ...
function resources_open_binary (line 28) | def resources_open_binary(package: str, resource: str) -> IO[bytes]:
function resources_read_text (line 31) | def resources_read_text(package: str, resource: str, encoding: str = "ut...
function resources_path (line 35) | def resources_path(package: str, resource: str) -> ContextManager[Path]:
class CompatibleSequence (line 53) | class CompatibleSequence(Sequence[T]): # pragma: no cover
method __init__ (line 56) | def __init__(self, data: Sequence[T]) -> None:
method __getitem__ (line 59) | def __getitem__(self, index: str | slice | int) -> T | Sequence[T]: #...
method __len__ (line 73) | def __len__(self) -> int:
method __iter__ (line 76) | def __iter__(self) -> Iterator[T]:
method keys (line 79) | def keys(self) -> Sequence[str]:
method values (line 87) | def values(self) -> Sequence[T]:
method items (line 95) | def items(self) -> Iterator[tuple[str, T]]:
FILE: src/pdm/core.py
class State (line 49) | class State:
class Core (line 64) | class Core:
method __init__ (line 74) | def __init__(self) -> None:
method create_temp_dir (line 84) | def create_temp_dir(self, *args: Any, **kwargs: Any) -> str:
method init_parser (line 87) | def init_parser(self) -> None:
method __call__ (line 122) | def __call__(self, *args: Any, **kwargs: Any) -> None:
method ensure_project (line 125) | def ensure_project(self, options: argparse.Namespace, obj: Project | N...
method create_project (line 140) | def create_project(
method handle (line 158) | def handle(self, project: Project, options: argparse.Namespace) -> None:
method get_command (line 198) | def get_command(args: list[str]) -> tuple[int, str]:
method _get_cli_args (line 216) | def _get_cli_args(self, args: list[str], obj: Project | None) -> list[...
method main (line 231) | def main(
method register_command (line 284) | def register_command(self, command: type[BaseCommand], name: str | Non...
method add_config (line 299) | def add_config(name: str, config_item: ConfigItem) -> None:
method _add_project_plugins_library (line 308) | def _add_project_plugins_library(self) -> None:
method load_plugins (line 333) | def load_plugins(self) -> None:
method uv_cmd (line 357) | def uv_cmd(self) -> list[str]:
function main (line 387) | def main(args: list[str] | None = None) -> None:
FILE: src/pdm/environments/base.py
class BaseEnvironment (line 34) | class BaseEnvironment(abc.ABC):
method __init__ (line 40) | def __init__(self, project: Project, *, python: str | None = None) -> ...
method auth (line 56) | def auth(self) -> PdmBasicAuth:
method is_global (line 62) | def is_global(self) -> bool:
method interpreter (line 67) | def interpreter(self) -> PythonInfo:
method get_paths (line 71) | def get_paths(self, dist_name: str | None = None) -> dict[str, str]:
method process_env (line 79) | def process_env(self) -> dict[str, str]:
method _build_session (line 87) | def _build_session(
method session (line 106) | def session(self) -> PDMPyPIClient:
method get_finder (line 111) | def get_finder(
method _setting_list (line 172) | def _setting_list(self, var: str, key: str) -> list[str]:
method get_working_set (line 184) | def get_working_set(self) -> WorkingSet:
method spec (line 190) | def spec(self) -> EnvSpec:
method allow_all_spec (line 194) | def allow_all_spec(self) -> EnvSpec:
method which (line 197) | def which(self, command: str) -> str | None:
method _download_pip_wheel (line 210) | def _download_pip_wheel(self, path: str | Path) -> None: # pragma: no...
method pip_command (line 227) | def pip_command(self) -> list[str]:
method script_kind (line 257) | def script_kind(self) -> str:
class BareEnvironment (line 270) | class BareEnvironment(BaseEnvironment):
method __init__ (line 273) | def __init__(self, project: Project) -> None:
method get_paths (line 276) | def get_paths(self, dist_name: str | None = None) -> dict[str, str]:
method get_working_set (line 279) | def get_working_set(self) -> WorkingSet:
FILE: src/pdm/environments/local.py
function _get_shebang_path (line 13) | def _get_shebang_path(executable: str, is_launcher: bool) -> bytes:
function _is_console_script (line 26) | def _is_console_script(content: bytes) -> bool:
function _replace_shebang (line 45) | def _replace_shebang(path: Path, new_executable: bytes) -> None:
class PythonLocalEnvironment (line 76) | class PythonLocalEnvironment(BaseEnvironment):
method process_env (line 84) | def process_env(self) -> dict[str, str]:
method packages_path (line 95) | def packages_path(self) -> Path:
method get_paths (line 110) | def get_paths(self, dist_name: str | None = None) -> dict[str, str]:
method update_shebangs (line 115) | def update_shebangs(self, new_path: str) -> None:
FILE: src/pdm/environments/python.py
class PythonEnvironment (line 14) | class PythonEnvironment(BaseEnvironment):
method __init__ (line 17) | def __init__(
method get_paths (line 29) | def get_paths(self, dist_name: str | None = None) -> dict[str, str]:
method process_env (line 50) | def process_env(self) -> dict[str, str]:
method get_working_set (line 57) | def get_working_set(self) -> WorkingSet:
FILE: src/pdm/exceptions.py
class PdmException (line 10) | class PdmException(Exception):
class ResolutionError (line 14) | class ResolutionError(PdmException):
class PdmArgumentError (line 18) | class PdmArgumentError(PdmException):
class PdmUsageError (line 22) | class PdmUsageError(PdmException):
class RequirementError (line 26) | class RequirementError(PdmUsageError, ValueError):
class PublishError (line 30) | class PublishError(PdmUsageError):
class InvalidPyVersion (line 34) | class InvalidPyVersion(PdmUsageError, ValueError):
class CandidateNotFound (line 38) | class CandidateNotFound(PdmException):
class CandidateInfoNotFound (line 42) | class CandidateInfoNotFound(PdmException):
method __init__ (line 43) | def __init__(self, candidate: Candidate) -> None:
class PDMWarning (line 49) | class PDMWarning(Warning):
class PackageWarning (line 53) | class PackageWarning(PDMWarning):
class PDMDeprecationWarning (line 57) | class PDMDeprecationWarning(PDMWarning, DeprecationWarning):
class ExtrasWarning (line 64) | class ExtrasWarning(PDMWarning):
method __init__ (line 65) | def __init__(self, project_name: str, extras: list[str]) -> None:
class ProjectError (line 70) | class ProjectError(PdmUsageError):
class InstallationError (line 74) | class InstallationError(PdmException):
class UninstallError (line 78) | class UninstallError(PdmException):
class NoConfigError (line 82) | class NoConfigError(PdmUsageError, KeyError):
method __str__ (line 83) | def __str__(self) -> str:
class NoPythonVersion (line 87) | class NoPythonVersion(PdmUsageError):
class BuildError (line 91) | class BuildError(PdmException, RuntimeError):
FILE: src/pdm/formats/__init__.py
class _Format (line 19) | class _Format(Protocol):
method check_fingerprint (line 20) | def check_fingerprint(self, project: Project | None, filename: str | P...
method convert (line 22) | def convert(
method export (line 29) | def export(self, project: Project, candidates: ExportItems, options: N...
FILE: src/pdm/formats/base.py
function convert_from (line 12) | def convert_from(field: str | None = None, name: str | None = None) -> C...
class Unset (line 21) | class Unset(Exception):
class MetaConvertError (line 25) | class MetaConvertError(Exception):
method __init__ (line 28) | def __init__(self, errors: list[str], *, data: dict[str, Any], setting...
method __str__ (line 33) | def __str__(self) -> str:
class _MetaConverterMeta (line 37) | class _MetaConverterMeta(type):
method __init__ (line 38) | def __init__(cls, name: str, bases: tuple[type, ...], ns: dict[str, An...
class MetaConverter (line 48) | class MetaConverter(metaclass=_MetaConverterMeta):
method __init__ (line 53) | def __init__(self, source: dict, ui: termui.UI | None = None) -> None:
method convert (line 59) | def convert(self) -> tuple[Mapping[str, Any], Mapping[str, Any]]:
function make_inline_table (line 88) | def make_inline_table(data: Mapping) -> dict:
function make_array (line 95) | def make_array(data: list, multiline: bool = False) -> list:
function array_of_inline_tables (line 103) | def array_of_inline_tables(value: list[Mapping], multiline: bool = True)...
FILE: src/pdm/formats/flit.py
function check_fingerprint (line 26) | def check_fingerprint(project: Project | None, filename: PathLike) -> bool:
function _get_author (line 36) | def _get_author(metadata: dict[str, Any], type_: str = "author") -> list...
function get_docstring_and_version_via_ast (line 42) | def get_docstring_and_version_via_ast(
class FlitMetaConverter (line 73) | class FlitMetaConverter(MetaConverter):
method warn_against_dynamic_version_or_docstring (line 74) | def warn_against_dynamic_version_or_docstring(self, source: Path, vers...
method name (line 93) | def name(self, metadata: dict[str, Any]) -> str:
method entry_points (line 134) | def entry_points(self, value: dict[str, dict[str, str]]) -> dict[str, ...
method includes (line 138) | def includes(self, value: dict[str, list[str]]) -> None:
function convert (line 145) | def convert(project: Project | None, filename: PathLike, options: Namesp...
function export (line 151) | def export(project: Project, candidates: list, options: Namespace | None...
FILE: src/pdm/formats/pipfile.py
function convert_pipfile_requirement (line 26) | def convert_pipfile_requirement(name: str, req: RequirementDict, backend...
function check_fingerprint (line 46) | def check_fingerprint(project: Project, filename: PathLike) -> bool:
function convert (line 50) | def convert(project: Project, filename: PathLike, options: Namespace | N...
function export (line 76) | def export(project: Project, candidates: list, options: Any) -> None:
FILE: src/pdm/formats/poetry.py
function check_fingerprint (line 31) | def check_fingerprint(project: Project | None, filename: Path | str) -> ...
function _convert_specifier (line 46) | def _convert_specifier(version: str) -> str:
function _convert_python (line 62) | def _convert_python(python: str) -> PySpecSet:
function _convert_req (line 69) | def _convert_req(name: str, req_dict: RequirementDict | list[Requirement...
function parse_name_email (line 115) | def parse_name_email(name_email: list[str]) -> list[dict]:
class PoetryMetaConverter (line 128) | class PoetryMetaConverter(MetaConverter):
method authors (line 130) | def authors(self, value: list[str]) -> list[dict]:
method maintainers (line 134) | def maintainers(self, value: list[str]) -> list[dict]:
method license (line 138) | def license(self, value: str) -> dict[str, str]:
method requires_python (line 142) | def requires_python(self, source: dict[str, Any]) -> str:
method urls (line 147) | def urls(self, source: dict[str, Any]) -> dict[str, str]:
method entry_points (line 158) | def entry_points(self, value: dict[str, dict[str, str]]) -> dict[str, ...
method dependencies (line 162) | def dependencies(self, source: dict[str, Any]) -> list[str]:
method dev_dependencies (line 178) | def dev_dependencies(self, value: dict) -> None:
method group_dependencies (line 185) | def group_dependencies(self, value: dict[str, dict[str, Any]]) -> None:
method package_mode (line 193) | def package_mode(self, value: bool) -> None:
method includes (line 198) | def includes(self, source: dict[str, list[str] | str]) -> list[str]:
method excludes (line 218) | def excludes(self, value: list[str]) -> None:
method build (line 223) | def build(self, value: str | dict) -> None:
method sources (line 231) | def sources(self, value: list[dict[str, Any]]) -> None:
function convert (line 243) | def convert(
function export (line 253) | def export(project: Project, candidates: list, options: Any) -> None:
FILE: src/pdm/formats/pylock.py
function _group_sort_key (line 21) | def _group_sort_key(group: str) -> tuple[bool, str]:
class PyLockConverter (line 25) | class PyLockConverter:
method __init__ (line 28) | def __init__(self, project: Project, locked_repository: LockedReposito...
method make_package (line 32) | def make_package(self, package: Package) -> dict[str, Any]:
method _populate_hashes (line 95) | def _populate_hashes(self, packages: Iterable[Package]) -> None:
method convert (line 110) | def convert(self, all_groups: Iterable[str] | None = None) -> dict[str...
FILE: src/pdm/formats/requirements.py
class RequirementParser (line 24) | class RequirementParser:
method __init__ (line 31) | def __init__(self, session: PDMPyPIClient) -> None:
method _clean_line (line 49) | def _clean_line(self, line: str) -> str:
method _parse_line (line 56) | def _parse_line(self, filename: str, line: str) -> None:
method parse_lines (line 83) | def parse_lines(self, lines: Iterable[str], filename: str = "<temp fil...
method parse_file (line 95) | def parse_file(self, filename_or_url: str) -> None:
function check_fingerprint (line 108) | def check_fingerprint(project: Project, filename: PathLike) -> bool:
function _is_url_trusted (line 122) | def _is_url_trusted(url: str, trusted_hosts: list[str]) -> bool:
function convert_url_to_source (line 132) | def convert_url_to_source(url: str, name: str | None, trusted_hosts: lis...
function convert (line 145) | def convert(project: Project, filename: PathLike, options: Namespace) ->...
function export (line 194) | def export(
FILE: src/pdm/formats/setup_py.py
function check_fingerprint (line 13) | def check_fingerprint(project: Project, filename: Path) -> bool:
function convert (line 17) | def convert(project: Project, filename: Path, options: Any | None) -> tu...
function export (line 64) | def export(project: Project, candidates: list, options: Any | None) -> str:
FILE: src/pdm/formats/uv.py
class _UvFileBuilder (line 22) | class _UvFileBuilder:
method default_source (line 30) | def default_source(self) -> str:
method __post_init__ (line 33) | def __post_init__(self) -> None:
method build_pyproject_toml (line 36) | def build_pyproject_toml(self) -> Path:
method _enter_path (line 80) | def _enter_path(self, path: Path) -> Path:
method build_uv_lock (line 93) | def build_uv_lock(self, include_self: bool = False) -> Path:
method _get_name (line 137) | def _get_name(self, req: FileRequirement) -> str:
method _build_source (line 143) | def _build_source(self, req: FileRequirement) -> dict[str, Any]:
method _build_lock_source (line 157) | def _build_lock_source(self, req: Requirement) -> dict[str, Any]:
method _build_lock_entry (line 168) | def _build_lock_entry(self, packages: list[Package]) -> dict[str, Any]:
method _make_dependency (line 213) | def _make_dependency(self, parent: Candidate | None, req: Requirement)...
function uv_file_builder (line 243) | def uv_file_builder(
FILE: src/pdm/installers/base.py
function editables_candidate (line 20) | def editables_candidate(environment: BaseEnvironment) -> Candidate | None:
class BaseSynchronizer (line 27) | class BaseSynchronizer:
method __init__ (line 46) | def __init__(
method self_candidate (line 87) | def self_candidate(self) -> Candidate:
method candidates (line 92) | def candidates(self) -> dict[str, Candidate]:
method should_install_editables (line 121) | def should_install_editables(self) -> bool:
method manager (line 133) | def manager(self) -> InstallManager:
method get_manager (line 138) | def get_manager(self, rename_pth: bool = False) -> InstallManager:
method self_key (line 144) | def self_key(self) -> str | None:
method _should_update (line 152) | def _should_update(self, dist: Distribution, can: Candidate) -> bool:
method compare_with_working_set (line 179) | def compare_with_working_set(self) -> tuple[list[str], list[str], list...
method synchronize (line 214) | def synchronize(self) -> None:
FILE: src/pdm/installers/core.py
function install_requirements (line 10) | def install_requirements(
FILE: src/pdm/installers/installers.py
class WheelFile (line 31) | class WheelFile(_WheelFile):
method dist_info_dir (line 33) | def dist_info_dir(self) -> str:
class PackageWheelSource (line 42) | class PackageWheelSource(WheelSource):
method __init__ (line 43) | def __init__(self, package: CachedPackage) -> None:
method dist_info_dir (line 50) | def dist_info_dir(self) -> str:
method dist_info_filenames (line 54) | def dist_info_filenames(self) -> list[str]:
method read_dist_info (line 57) | def read_dist_info(self, filename: str) -> str:
method iter_files (line 60) | def iter_files(self) -> Iterable[Path]:
method get_contents (line 67) | def get_contents(self) -> Iterator[WheelContentElement]:
class InstallDestination (line 89) | class InstallDestination(SchemeDictionaryDestination):
method __init__ (line 90) | def __init__(
method write_to_fs (line 101) | def write_to_fs(self, scheme: Scheme, path: str, stream: BinaryIO, is_...
function _get_link_method (line 134) | def _get_link_method(cache_method: str) -> LinkMethod:
function install_wheel (line 145) | def install_wheel(
function install (line 195) | def install(
FILE: src/pdm/installers/manager.py
class InstallManager (line 16) | class InstallManager:
method __init__ (line 22) | def __init__(
method install (line 29) | def install(self, candidate: Candidate) -> Distribution:
method get_paths_to_remove (line 42) | def get_paths_to_remove(self, dist: Distribution) -> BaseRemovePaths:
method uninstall (line 46) | def uninstall(self, dist: Distribution) -> None:
method overwrite (line 59) | def overwrite(self, dist: Distribution, candidate: Candidate) -> None:
FILE: src/pdm/installers/synchronizers.py
class Synchronizer (line 22) | class Synchronizer(BaseSynchronizer):
method install_candidate (line 23) | def install_candidate(self, key: str, progress: Progress) -> Candidate:
method update_candidate (line 40) | def update_candidate(self, key: str, progress: Progress) -> tuple[Dist...
method remove_distribution (line 70) | def remove_distribution(self, key: str, progress: Progress) -> Distrib...
method _show_headline (line 91) | def _show_headline(self, packages: dict[str, list[str]]) -> None:
method _show_summary (line 106) | def _show_summary(self, packages: dict[str, list[str]]) -> None:
method _fix_pth_files (line 128) | def _fix_pth_files(self) -> None:
method synchronize (line 143) | def synchronize(self) -> None:
FILE: src/pdm/installers/uninstallers.py
function renames (line 24) | def renames(old: str, new: str) -> None:
function compress_for_rename (line 41) | def compress_for_rename(paths: Iterable[NormalizedPath]) -> set[Normaliz...
function _script_names (line 84) | def _script_names(script_name: str, is_gui: bool) -> Iterable[str]:
function _cache_file_from_source (line 95) | def _cache_file_from_source(py_file: NormalizedPath) -> Iterable[Normali...
function _get_file_root (line 104) | def _get_file_root(path: str, base: str) -> str | None:
function _get_all_parents (line 114) | def _get_all_parents(path: NormalizedPath) -> Iterable[NormalizedPath]:
class BaseRemovePaths (line 123) | class BaseRemovePaths(abc.ABC):
method __init__ (line 126) | def __init__(self, dist: Distribution, environment: BaseEnvironment) -...
method difference_update (line 133) | def difference_update(self, other: BaseRemovePaths) -> None:
method remove (line 142) | def remove(self) -> None:
method commit (line 146) | def commit(self) -> None:
method rollback (line 150) | def rollback(self) -> None:
method from_dist (line 154) | def from_dist(cls: type[_T], dist: Distribution, environment: BaseEnvi...
method add_pth (line 210) | def add_pth(self, line: str) -> None:
method add_path (line 213) | def add_path(self, path: str) -> None:
class StashedRemovePaths (line 225) | class StashedRemovePaths(BaseRemovePaths):
method __init__ (line 230) | def __init__(self, dist: Distribution, environment: BaseEnvironment) -...
method remove (line 237) | def remove(self) -> None:
method _remove_pth (line 241) | def _remove_pth(self) -> None:
method _stash_files (line 254) | def _stash_files(self) -> None:
method commit (line 281) | def commit(self) -> None:
method rollback (line 295) | def rollback(self) -> None:
FILE: src/pdm/installers/uv.py
class UvSynchronizer (line 15) | class UvSynchronizer(BaseSynchronizer):
method __init__ (line 16) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method synchronize (line 25) | def synchronize(self) -> None:
method _get_sync_command (line 56) | def _get_sync_command(self) -> list[str | HiddenText]:
class QuietUvSynchronizer (line 91) | class QuietUvSynchronizer(UvSynchronizer):
method _get_sync_command (line 92) | def _get_sync_command(self) -> list[str | HiddenText]:
FILE: src/pdm/misc/sysconfig_patcher.py
class WordReplace (line 46) | class WordReplace:
function read_sysconfig_data_ast (line 64) | def read_sysconfig_data_ast(fname):
function update_prefix (line 70) | def update_prefix(value: str, real_prefix: str):
function sync_file (line 76) | def sync_file(fn):
function select_child (line 83) | def select_child(ast_obj, type_):
function patch_sysconfig_ast (line 87) | def patch_sysconfig_ast(obj, real_prefix, variable_updates=None):
function patch_sysconfig (line 149) | def patch_sysconfig(path: Path, real_prefix: Path, dry_run: bool, backup...
function find_pkgconfigs (line 180) | def find_pkgconfigs(path: Path):
function write_new_pkgconfig (line 191) | def write_new_pkgconfig(fname: Path, real_prefix: Path, dest_path: Path):
function patch_pkgconfig (line 219) | def patch_pkgconfig(pkgconfig_file, real_prefix, dry_run: bool, backup_f...
function find_libdir (line 237) | def find_libdir(real_prefix: Path):
function find_sysconfigdata (line 252) | def find_sysconfigdata(real_prefix: Path):
function patch (line 269) | def patch(real_prefix: Path) -> None:
FILE: src/pdm/models/auth.py
class PdmBasicAuth (line 14) | class PdmBasicAuth(MultiDomainBasicAuth):
method __init__ (line 21) | def __init__(self, ui: UI, sources: list[RepositoryConfig]) -> None:
method _get_new_credentials (line 27) | def _get_new_credentials(
method _get_auth_from_index_url (line 40) | def _get_auth_from_index_url(self, url: str) -> tuple[MaybeAuth, str |...
method _prompt_for_password (line 64) | def _prompt_for_password(self, netloc: str, username: str | None = Non...
method _should_save_password_to_keyring (line 72) | def _should_save_password_to_keyring(self) -> bool:
class Keyring (line 82) | class Keyring:
method __init__ (line 83) | def __init__(self) -> None:
method get_auth_info (line 88) | def get_auth_info(self, url: str, username: str | None) -> tuple[str, ...
method save_auth_info (line 100) | def save_auth_info(self, url: str, username: str, password: str) -> bool:
method delete_auth_info (line 113) | def delete_auth_info(self, url: str, username: str) -> bool:
FILE: src/pdm/models/backends.py
class BuildBackend (line 17) | class BuildBackend(metaclass=abc.ABCMeta):
method __init__ (line 20) | def __init__(self, root: Path) -> None:
method expand_line (line 23) | def expand_line(self, line: str, expand_env: bool = True) -> str:
method relative_path_to_url (line 26) | def relative_path_to_url(self, path: str) -> str:
method build_system (line 31) | def build_system(cls) -> BuildSystem:
class FlitBackend (line 35) | class FlitBackend(BuildBackend):
method build_system (line 37) | def build_system(cls) -> BuildSystem:
class SetuptoolsBackend (line 44) | class SetuptoolsBackend(BuildBackend):
method build_system (line 46) | def build_system(cls) -> BuildSystem:
class PDMBackend (line 53) | class PDMBackend(BuildBackend):
method expand_line (line 54) | def expand_line(self, req: str, expand_env: bool = True) -> str:
method relative_path_to_url (line 60) | def relative_path_to_url(self, path: str) -> str:
method build_system (line 66) | def build_system(cls) -> BuildSystem:
class PathContext (line 74) | class PathContext:
method __init__ (line 75) | def __init__(self, path: Path) -> None:
method __format__ (line 78) | def __format__(self, __format_spec: str) -> str:
class EnvContext (line 88) | class EnvContext:
method __init__ (line 89) | def __init__(self, expand: bool = True) -> None:
method __format__ (line 92) | def __format__(self, __format_spec: str) -> str:
class HatchBackend (line 103) | class HatchBackend(BuildBackend):
method expand_line (line 104) | def expand_line(self, line: str, expand_env: bool = True) -> str:
method relative_path_to_url (line 111) | def relative_path_to_url(self, path: str) -> str:
method build_system (line 117) | def build_system(cls) -> BuildSystem:
function get_backend (line 134) | def get_backend(name: str) -> type[BuildBackend]:
function get_backend_by_spec (line 139) | def get_backend_by_spec(spec: dict) -> type[BuildBackend]:
function get_relative_path (line 151) | def get_relative_path(url: str) -> str | None:
FILE: src/pdm/models/cached_package.py
class CachedPackage (line 12) | class CachedPackage:
method __init__ (line 28) | def __init__(self, path: str | Path, original_wheel: Path | None = Non...
method lock (line 33) | def lock(self) -> ContextManager[Any]:
method checksum (line 39) | def checksum(self) -> str:
method dist_info (line 44) | def dist_info(self) -> Path:
method referrers (line 54) | def referrers(self) -> set[str]:
method add_referrer (line 67) | def add_referrer(self, path: str) -> None:
method remove_referrer (line 74) | def remove_referrer(self, path: str) -> None:
method cleanup (line 81) | def cleanup(self) -> None:
FILE: src/pdm/models/caches.py
class JSONFileCache (line 31) | class JSONFileCache(Generic[KT, VT]):
method __init__ (line 34) | def __init__(self, cache_file: Path | str) -> None:
method _read_cache (line 39) | def _read_cache(self) -> None:
method _write_cache (line 49) | def _write_cache(self) -> None:
method __contains__ (line 53) | def __contains__(self, obj: KT) -> bool:
method _get_key (line 57) | def _get_key(cls, obj: KT) -> str:
method get (line 60) | def get(self, obj: KT) -> VT:
method set (line 64) | def set(self, obj: KT, value: VT) -> None:
class CandidateInfoCache (line 70) | class CandidateInfoCache(JSONFileCache[Candidate, CandidateInfo]):
method get_url_part (line 76) | def get_url_part(link: Link) -> str:
method _get_key (line 85) | def _get_key(cls, obj: Candidate) -> str:
class HashCache (line 97) | class HashCache:
method __init__ (line 108) | def __init__(self, directory: Path | str) -> None:
method _read_from_link (line 111) | def _read_from_link(self, link: Link, session: Client) -> Iterable[byt...
method _get_file_hash (line 125) | def _get_file_hash(self, link: Link, session: Client) -> str:
method _should_cache (line 132) | def _should_cache(self, link: Link) -> bool:
method get_hash (line 137) | def get_hash(self, link: Link, session: Client) -> str:
method _get_path_for_key (line 155) | def _get_path_for_key(self, key: str) -> Path:
method get (line 160) | def get(self, url: str) -> str | None:
method set (line 166) | def set(self, url: str, hash: str) -> None:
class EmptyCandidateInfoCache (line 174) | class EmptyCandidateInfoCache(CandidateInfoCache):
method get (line 175) | def get(self, obj: Candidate) -> CandidateInfo:
method set (line 178) | def set(self, obj: Candidate, value: CandidateInfo) -> None:
class EmptyHashCache (line 182) | class EmptyHashCache(HashCache):
method get (line 183) | def get(self, url: str) -> str | None:
method set (line 186) | def set(self, url: str, hash: str) -> None:
class WheelCache (line 190) | class WheelCache:
method __init__ (line 198) | def __init__(self, directory: Path | str) -> None:
method _get_candidates (line 202) | def _get_candidates(self, path: Path) -> Iterable[Path]:
method _get_path_parts (line 209) | def _get_path_parts(self, link: Link, env_spec: EnvSpec) -> tuple[str,...
method get_path_for_link (line 226) | def get_path_for_link(self, link: Link, env_spec: EnvSpec) -> Path:
method get_ephemeral_path_for_link (line 230) | def get_ephemeral_path_for_link(self, link: Link, env_spec: EnvSpec) -...
method get (line 234) | def get(self, link: Link, project_name: str | None, env_spec: EnvSpec)...
method _get_from_path (line 244) | def _get_from_path(self, path: Path, canonical_name: str, env_spec: En...
function get_wheel_cache (line 269) | def get_wheel_cache(directory: Path | str) -> WheelCache:
class PackageCache (line 273) | class PackageCache:
method __init__ (line 274) | def __init__(self, root: Path) -> None:
method cache_wheel (line 277) | def cache_wheel(self, wheel: Path) -> CachedPackage:
method iter_packages (line 303) | def iter_packages(self) -> Iterable[CachedPackage]:
method cleanup (line 310) | def cleanup(self) -> int:
FILE: src/pdm/models/candidates.py
function _dist_info_files (line 49) | def _dist_info_files(whl_zip: ZipFile) -> list[str]:
function _get_wheel_metadata_from_wheel (line 61) | def _get_wheel_metadata_from_wheel(whl_file: Path, metadata_directory: s...
function _filter_none (line 72) | def _filter_none(data: dict[str, Any]) -> dict[str, Any]:
function _find_best_match_link (line 77) | def _find_best_match_link(finder: PackageFinder, req: Requirement, files...
class MetadataDistribution (line 99) | class MetadataDistribution(im.Distribution):
method __init__ (line 102) | def __init__(self, text: str) -> None:
method locate_file (line 105) | def locate_file(self, path: str | os.PathLike[str]) -> _SimplePath:
method read_text (line 108) | def read_text(self, filename: str) -> str | None:
class Candidate (line 114) | class Candidate:
method __init__ (line 136) | def __init__(
method identify (line 165) | def identify(self) -> str:
method copy_with (line 168) | def copy_with(self, requirement: Requirement) -> Candidate:
method dep_key (line 180) | def dep_key(self) -> tuple[str, str | None]:
method prepared (line 189) | def prepared(self) -> PreparedCandidate | None:
method __eq__ (line 192) | def __eq__(self, other: Any) -> bool:
method get_revision (line 199) | def get_revision(self) -> str:
method __repr__ (line 208) | def __repr__(self) -> str:
method __str__ (line 213) | def __str__(self) -> str:
method from_installation_candidate (line 220) | def from_installation_candidate(cls, candidate: Package, req: Requirem...
method requires_python (line 230) | def requires_python(self) -> str:
method requires_python (line 248) | def requires_python(self, value: str) -> None:
method as_lockfile_entry (line 256) | def as_lockfile_entry(self, project_root: Path) -> dict[str, Any]:
method format (line 295) | def format(self) -> str:
method prepare (line 299) | def prepare(self, environment: BaseEnvironment, reporter: CandidateRep...
class PreparedCandidate (line 313) | class PreparedCandidate:
method __post_init__ (line 324) | def __post_init__(self) -> None:
method _replace_url_vars (line 338) | def _replace_url_vars(self, link: Link | None) -> Link | None:
method revision (line 345) | def revision(self) -> str:
method direct_url (line 361) | def direct_url(self) -> dict[str, Any] | None:
method build (line 410) | def build(self) -> Path:
method _obtain (line 430) | def _obtain(self, allow_all: bool = False, unpack: bool = True) -> None:
method _unpack (line 468) | def _unpack(self, validate_hashes: bool = False) -> None:
method prepare_metadata (line 494) | def prepare_metadata(self, force_build: bool = False) -> im.Distribution:
method _get_metadata_from_metadata_link (line 527) | def _get_metadata_from_metadata_link(
method _get_metadata_from_wheel (line 538) | def _get_metadata_from_wheel(self, wheel: Path) -> im.Distribution:
method _get_metadata_from_project (line 544) | def _get_metadata_from_project(self, pyproject_toml: Path) -> im.Distr...
method _get_metadata_from_build (line 598) | def _get_metadata_from_build(self, source_dir: Path, metadata_parent: ...
method metadata (line 619) | def metadata(self) -> im.Distribution:
method get_dependencies_from_metadata (line 631) | def get_dependencies_from_metadata(self) -> list[Requirement]:
method should_cache (line 636) | def should_cache(self) -> bool:
method _get_build_cache (line 660) | def _get_build_cache(self) -> Path | None:
method _get_build_dir (line 670) | def _get_build_dir(self) -> str:
method _wheel_compatible (line 701) | def _wheel_compatible(self, wheel_file: str, allow_all: bool = False) ...
method _get_wheel_dir (line 705) | def _get_wheel_dir(self) -> str:
FILE: src/pdm/models/finder.py
class ReverseVersion (line 20) | class ReverseVersion(Version):
method __lt__ (line 23) | def __lt__(self, other: Any) -> bool:
method __le__ (line 26) | def __le__(self, other: Any) -> bool:
method __gt__ (line 29) | def __gt__(self, other: Any) -> bool:
method __ge__ (line 32) | def __ge__(self, other: Any) -> bool:
class PDMEvaluator (line 36) | class PDMEvaluator(Evaluator):
method __init__ (line 37) | def __init__(self, *args: Any, env_spec: EnvSpec, **kwargs: Any) -> None:
method check_requires_python (line 41) | def check_requires_python(self, link: unearth.Link) -> None:
method check_wheel_tags (line 55) | def check_wheel_tags(self, filename: str) -> None:
class PDMPackageFinder (line 62) | class PDMPackageFinder(unearth.PackageFinder):
method __init__ (line 63) | def __init__(
method build_evaluator (line 75) | def build_evaluator(self, package_name: str, allow_yanked: bool = Fals...
method _sort_key (line 86) | def _sort_key(self, package: Package) -> tuple:
FILE: src/pdm/models/in_process/__init__.py
function _in_process_script (line 22) | def _in_process_script(name: str) -> Generator[str, None, None]:
function get_sys_config_paths (line 27) | def get_sys_config_paths(executable: str, vars: dict[str, str] | None = ...
function parse_setup_py (line 39) | def parse_setup_py(executable: str, path: str) -> dict[str, Any]:
function get_env_spec (line 50) | def get_env_spec(executable: str) -> EnvSpec:
FILE: src/pdm/models/in_process/env_spec.py
function get_current_env_spec (line 10) | def get_current_env_spec() -> dict[str, str | bool]:
FILE: src/pdm/models/in_process/parse_setup.py
function _parse_setup_cfg (line 8) | def _parse_setup_cfg(path: str) -> dict[str, Any]:
function fake_setup (line 116) | def fake_setup(**kwargs):
function clean_metadata (line 120) | def clean_metadata(metadata: dict[str, Any]) -> None:
function parse_setup (line 167) | def parse_setup(path: str) -> dict[str, Any]:
function json_default (line 210) | def json_default(o):
FILE: src/pdm/models/in_process/sysconfig_get_paths.py
function _running_under_venv (line 7) | def _running_under_venv():
function _running_under_regular_virtualenv (line 12) | def _running_under_regular_virtualenv():
function running_under_virtualenv (line 18) | def running_under_virtualenv():
function _get_user_scheme (line 23) | def _get_user_scheme():
function get_paths (line 31) | def get_paths(kind="default", vars=None):
function main (line 46) | def main():
FILE: src/pdm/models/markers.py
function exclude_multi (line 35) | def exclude_multi(marker: Marker, *names: str) -> Marker:
class Marker (line 43) | class Marker:
method __and__ (line 46) | def __and__(self, other: Any) -> Marker:
method __or__ (line 51) | def __or__(self, other: Any) -> Marker:
method is_any (line 56) | def is_any(self) -> bool:
method is_empty (line 59) | def is_empty(self) -> bool:
method __str__ (line 62) | def __str__(self) -> str:
method __repr__ (line 65) | def __repr__(self) -> str:
method evaluate (line 68) | def evaluate(self, environment: dict[str, Any] | None = None) -> bool:
method matches (line 71) | def matches(self, spec: EnvSpec) -> bool:
method split_pyspec (line 80) | def split_pyspec(self) -> tuple[Marker, PySpecSet]:
method split_extras (line 88) | def split_extras(self) -> tuple[Marker, Marker]:
function get_marker (line 97) | def get_marker(marker: None) -> None: ...
function get_marker (line 101) | def get_marker(marker: PackageMarker | Marker | str) -> Marker: ...
function get_marker (line 104) | def get_marker(marker: PackageMarker | Marker | str | None) -> Marker | ...
function _build_pyspec_from_marker (line 117) | def _build_pyspec_from_marker(marker: BaseMarker) -> PySpecSet:
class EnvSpec (line 155) | class EnvSpec(_EnvSpec):
method replace (line 156) | def replace(self, **kwargs: Any) -> Self:
method markers_with_defaults (line 165) | def markers_with_defaults(self) -> dict[str, str]:
method from_marker (line 171) | def from_marker(cls, marker: Marker) -> Self: # pragma: no cover
method markers_with_python (line 195) | def markers_with_python(self) -> Marker:
method is_allow_all (line 214) | def is_allow_all(self) -> bool:
FILE: src/pdm/models/project_info.py
class ProjectInfo (line 16) | class ProjectInfo:
method from_distribution (line 32) | def from_distribution(cls, data: Distribution) -> ProjectInfo:
method from_metadata (line 59) | def from_metadata(cls, metadata: dict[str, Any]) -> ProjectInfo:
method generate_rows (line 81) | def generate_rows(self) -> Iterator[tuple[str, str]]:
FILE: src/pdm/models/python.py
class PythonInfo (line 16) | class PythonInfo:
method __init__ (line 21) | def __init__(self, py_version: PythonVersion) -> None:
method from_path (line 25) | def from_path(cls, path: str | Path) -> PythonInfo:
method valid (line 32) | def valid(self) -> bool:
method __hash__ (line 35) | def __hash__(self) -> int:
method __eq__ (line 38) | def __eq__(self, o: Any) -> bool:
method path (line 44) | def path(self) -> Path:
method executable (line 48) | def executable(self) -> Path:
method version (line 52) | def version(self) -> Version:
method implementation (line 56) | def implementation(self) -> str:
method major (line 60) | def major(self) -> int:
method minor (line 64) | def minor(self) -> int:
method micro (line 68) | def micro(self) -> int:
method version_tuple (line 72) | def version_tuple(self) -> tuple[int, ...]:
method is_32bit (line 76) | def is_32bit(self) -> bool:
method for_tag (line 79) | def for_tag(self) -> str:
method identifier (line 83) | def identifier(self) -> str:
method get_venv (line 95) | def get_venv(self) -> VirtualEnv | None:
FILE: src/pdm/models/reporter.py
class CandidateReporter (line 18) | class CandidateReporter:
method report_download (line 19) | def report_download(self, link: Any, completed: int, total: int | None...
method report_build_start (line 22) | def report_build_start(self, filename: str) -> None:
method report_build_end (line 25) | def report_build_end(self, filename: str) -> None:
method report_unpack (line 28) | def report_unpack(self, filename: Path, completed: int, total: int | N...
class RichProgressReporter (line 33) | class RichProgressReporter(CandidateReporter):
method report_download (line 37) | def report_download(self, link: Any, completed: int, total: int | None...
method report_unpack (line 40) | def report_unpack(self, filename: Path, completed: int, total: int | N...
method report_build_start (line 43) | def report_build_start(self, filename: str) -> None:
method report_build_end (line 49) | def report_build_end(self, filename: str) -> None:
class InstallationStatus (line 53) | class InstallationStatus:
method __init__ (line 54) | def __init__(self, ui: termui.UI, text: str) -> None:
method __rich_console__ (line 75) | def __rich_console__(self, console: Console, options: ConsoleOptions) ...
method update_spinner (line 80) | def update_spinner(
method start (line 95) | def start(self) -> None:
method stop (line 100) | def stop(self) -> None:
method __enter__ (line 106) | def __enter__(self) -> InstallationStatus:
method __exit__ (line 110) | def __exit__(self, *args: Any) -> None:
FILE: src/pdm/models/repositories/base.py
class CandidateMetadata (line 31) | class CandidateMetadata(NamedTuple):
function cache_result (line 37) | def cache_result(func: Callable[[T, Candidate], CandidateMetadata]) -> C...
class BaseRepository (line 50) | class BaseRepository:
method __init__ (line 53) | def __init__(
method get_filtered_sources (line 90) | def get_filtered_sources(self, req: Requirement) -> list[RepositoryCon...
method get_dependencies (line 94) | def get_dependencies(self, candidate: Candidate) -> tuple[list[Require...
method _find_candidates (line 114) | def _find_candidates(self, requirement: Requirement, minimal_version: ...
method is_this_package (line 117) | def is_this_package(self, requirement: Requirement) -> bool:
method make_this_candidate (line 122) | def make_this_candidate(self, requirement: Requirement) -> Candidate:
method _should_ignore_package_warning (line 135) | def _should_ignore_package_warning(self, requirement: Requirement) -> ...
method find_candidates (line 145) | def find_candidates(
method _get_dependencies_from_cache (line 256) | def _get_dependencies_from_cache(self, candidate: Candidate) -> Candid...
method _get_dependencies_from_metadata (line 269) | def _get_dependencies_from_metadata(self, candidate: Candidate) -> Can...
method get_hashes (line 277) | def get_hashes(self, candidate: Candidate) -> list[FileHash]:
method dependency_generators (line 320) | def dependency_generators(self) -> Iterable[Callable[[Candidate], Cand...
method search (line 326) | def search(self, query: str) -> SearchResults:
method fetch_hashes (line 334) | def fetch_hashes(self, candidates: Iterable[Candidate]) -> None:
FILE: src/pdm/models/repositories/lock.py
class Package (line 30) | class Package:
class LockedRepository (line 37) | class LockedRepository(BaseRepository):
method __init__ (line 38) | def __init__(
method add_package (line 50) | def add_package(self, package: Package) -> None:
method all_candidates (line 54) | def all_candidates(self) -> dict[str, list[Candidate]]:
method candidates (line 62) | def candidates(self) -> dict[str, Candidate]:
method _read_lockfile (line 74) | def _read_lockfile(self, lockfile: Mapping[str, Any]) -> None:
method _read_pylock (line 80) | def _read_pylock(self, lockfile: Mapping[str, Any]) -> None:
method _read_pdm_lock (line 133) | def _read_pdm_lock(self, lockfile: Mapping[str, Any]) -> None:
method _identify_candidate (line 174) | def _identify_candidate(self, candidate: Candidate) -> CandidateKey:
method _get_dependencies_from_lockfile (line 189) | def _get_dependencies_from_lockfile(self, candidate: Candidate) -> Can...
method dependency_generators (line 213) | def dependency_generators(self) -> Iterable[Callable[[Candidate], Cand...
method _matching_entries (line 216) | def _matching_entries(self, requirement: Requirement) -> Iterable[Pack...
method find_candidates (line 234) | def find_candidates(
method get_hashes (line 253) | def get_hashes(self, candidate: Candidate) -> list[FileHash]:
method evaluate_candidates (line 256) | def evaluate_candidates(self, groups: Collection[str], evaluate_marker...
method merge_result (line 271) | def merge_result(self, env_spec: EnvSpec, result: Iterable[Package]) -...
FILE: src/pdm/models/repositories/pypi.py
class PyPIRepository (line 17) | class PyPIRepository(BaseRepository):
method _get_dependencies_from_json (line 23) | def _get_dependencies_from_json(self, candidate: Candidate) -> Candida...
method dependency_generators (line 52) | def dependency_generators(self) -> Iterable[Callable[[Candidate], Cand...
method _find_candidates (line 58) | def _find_candidates(self, requirement: Requirement, minimal_version: ...
method search (line 75) | def search(self, query: str) -> SearchResults:
FILE: src/pdm/models/requirements.py
function strip_extras (line 58) | def strip_extras(line: str) -> tuple[str, tuple[str, ...] | None]:
function _get_random_key (line 67) | def _get_random_key(req: Requirement) -> str:
class Requirement (line 72) | class Requirement:
method __post_init__ (line 86) | def __post_init__(self) -> None:
method project_name (line 90) | def project_name(self) -> str | None:
method key (line 94) | def key(self) -> str | None:
method is_pinned (line 98) | def is_pinned(self) -> bool:
method as_pinned_version (line 105) | def as_pinned_version(self: T, other_version: str | None) -> T:
method _hash_key (line 112) | def _hash_key(self) -> tuple:
method __hash__ (line 119) | def __hash__(self) -> int:
method __eq__ (line 122) | def __eq__(self, o: object) -> bool:
method identify (line 125) | def identify(self) -> str:
method __repr__ (line 131) | def __repr__(self) -> str:
method __str__ (line 134) | def __str__(self) -> str:
method create (line 138) | def create(cls: type[T], **kwargs: Any) -> T:
method from_dist (line 151) | def from_dist(cls, dist: Distribution) -> Requirement:
method from_req_dict (line 173) | def from_req_dict(cls, name: str, req_dict: RequirementDict) -> Requir...
method is_named (line 186) | def is_named(self) -> bool:
method is_vcs (line 190) | def is_vcs(self) -> bool:
method is_file_or_url (line 194) | def is_file_or_url(self) -> bool:
method as_line (line 197) | def as_line(self) -> str:
method matches (line 200) | def matches(self, line: str) -> bool:
method from_pkg_requirement (line 212) | def from_pkg_requirement(cls, req: PackageRequirement) -> Requirement:
method _format_marker (line 228) | def _format_marker(self) -> str:
class NamedRequirement (line 235) | class NamedRequirement(Requirement):
method as_line (line 236) | def as_line(self) -> str:
class FileRequirement (line 246) | class FileRequirement(Requirement):
method __post_init__ (line 252) | def __post_init__(self) -> None:
method _hash_key (line 256) | def _hash_key(self) -> tuple:
method guess_name (line 259) | def guess_name(self) -> str | None:
method create (line 289) | def create(cls: type[T], **kwargs: Any) -> T:
method str_path (line 295) | def str_path(self) -> str | None:
method _parse_url (line 312) | def _parse_url(self) -> None:
method relocate (line 344) | def relocate(self, backend: BuildBackend) -> None:
method absolute_path (line 358) | def absolute_path(self) -> Path | None:
method is_local (line 362) | def is_local(self) -> bool:
method is_local_dir (line 366) | def is_local_dir(self) -> bool:
method as_file_link (line 369) | def as_file_link(self) -> Link:
method get_full_url (line 378) | def get_full_url(self) -> str:
method as_line (line 381) | def as_line(self) -> str:
method _parse_name_from_url (line 400) | def _parse_name_from_url(self) -> None:
method check_installable (line 412) | def check_installable(self) -> None:
class VcsRequirement (line 424) | class VcsRequirement(FileRequirement):
method __post_init__ (line 429) | def __post_init__(self) -> None:
method get_full_url (line 434) | def get_full_url(self) -> str:
method _parse_url (line 442) | def _parse_url(self) -> None:
function filter_requirements_with_extras (line 461) | def filter_requirements_with_extras(
function parse_as_pkg_requirement (line 486) | def parse_as_pkg_requirement(line: str) -> PackageRequirement:
function parse_line (line 495) | def parse_line(line: str) -> Requirement:
function parse_requirement (line 501) | def parse_requirement(line: str, editable: bool = False) -> Requirement:
FILE: src/pdm/models/search.py
class Result (line 12) | class Result:
method as_frozen (line 17) | def as_frozen(self) -> SearchResult:
class SearchResultParser (line 21) | class SearchResultParser(HTMLParser):
method __init__ (line 24) | def __init__(self) -> None:
method _match_class (line 32) | def _match_class(attrs: list[tuple[str, str | None]], name: str) -> bool:
method handle_starttag (line 36) | def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]...
method handle_data (line 51) | def handle_data(self, data: str) -> None:
method handle_endtag (line 56) | def handle_endtag(self, tag: str) -> None:
FILE: src/pdm/models/session.py
function _create_truststore_ssl_context (line 26) | def _create_truststore_ssl_context() -> SSLContext | None:
function _get_transport (line 53) | def _get_transport(
class ThreadedSyncSqliteStorage (line 61) | class ThreadedSyncSqliteStorage(hishel.SyncSqliteStorage):
method __init__ (line 62) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method connection (line 69) | def connection(self) -> sqlite3.Connection | None:
method connection (line 73) | def connection(self, conn: sqlite3.Connection | None) -> None:
method close (line 77) | def close(self) -> None:
method _ensure_connection (line 83) | def _ensure_connection(self) -> sqlite3.Connection:
class PDMPyPIClient (line 108) | class PDMPyPIClient(PyPIClient):
method __init__ (line 109) | def __init__(self, *, sources: list[RepositoryConfig], cache_dir: Path...
method _transport_for (line 158) | def _transport_for(self, source: RepositoryConfig) -> httpx.BaseTransp...
method _make_user_agent (line 173) | def _make_user_agent(self) -> str:
method on_response (line 178) | def on_response(self, response: httpx.Response) -> None:
FILE: src/pdm/models/setup.py
class Setup (line 17) | class Setup:
method update (line 29) | def update(self, other: Setup) -> None:
method as_dict (line 35) | def as_dict(self) -> dict[str, Any]:
method from_directory (line 39) | def from_directory(cls, dir: Path) -> Setup:
method as_dist (line 42) | def as_dist(self) -> Distribution:
class _SetupReader (line 46) | class _SetupReader:
method read_from_directory (line 52) | def read_from_directory(cls, directory: Path) -> Setup:
method read_pyproject_toml (line 70) | def read_pyproject_toml(file: Path) -> Setup:
method read_setup_py (line 94) | def read_setup_py(cls, file: Path) -> Setup:
method read_setup_cfg (line 113) | def read_setup_cfg(file: Path) -> Setup:
method _find_setup_call (line 163) | def _find_setup_call(cls, elements: list[Any]) -> tuple[ast.Call | Non...
method _find_sub_setup_call (line 212) | def _find_sub_setup_call(cls, elements: list[Any]) -> tuple[ast.Call |...
method _find_install_requires (line 229) | def _find_install_requires(cls, call: ast.Call, body: Iterable[Any]) -...
method _find_extras_require (line 273) | def _find_extras_require(cls, call: ast.Call, body: Iterable[Any]) -> ...
method _find_single_string (line 328) | def _find_single_string(cls, call: ast.Call, body: list[Any], name: st...
method _find_in_call (line 366) | def _find_in_call(call: ast.Call, name: str) -> Any | None:
method _find_call_kwargs (line 373) | def _find_call_kwargs(call: ast.Call) -> Any | None:
method _find_variable_in_body (line 382) | def _find_variable_in_body(body: Iterable[Any], name: str) -> Any | None:
method _find_in_dict (line 396) | def _find_in_dict(dict_: ast.Dict, name: str) -> Any | None:
class SetupDistribution (line 403) | class SetupDistribution(Distribution):
method __init__ (line 404) | def __init__(self, data: Setup) -> None:
method read_text (line 407) | def read_text(self, filename: str) -> str | None:
method locate_file (line 410) | def locate_file(self, path: str | os.PathLike[str]) -> _SimplePath:
method metadata (line 414) | def metadata(self) -> dict[str, Any]: # type: ignore[override]
method requires (line 427) | def requires(self) -> list[str] | None:
FILE: src/pdm/models/specifiers.py
function _read_max_versions (line 27) | def _read_max_versions() -> dict[Version, int]:
function get_specifier (line 35) | def get_specifier(version_str: str | None) -> SpecifierSet:
function fix_legacy_specifier (line 45) | def fix_legacy_specifier(specifier: str) -> str:
class PySpecSet (line 71) | class PySpecSet(SpecifierSet):
method __init__ (line 79) | def __init__(self, spec: str | VersionSpecifier = "") -> None:
method __hash__ (line 94) | def __hash__(self) -> int:
method __str__ (line 97) | def __str__(self) -> str:
method __eq__ (line 102) | def __eq__(self, other: Any) -> bool:
method is_empty (line 107) | def is_empty(self) -> bool:
method is_any (line 111) | def is_any(self) -> bool:
method _normalize (line 116) | def _normalize(cls, spec: VersionSpecifier) -> str:
method __repr__ (line 141) | def __repr__(self) -> str:
method __and__ (line 144) | def __and__(self, other: Any) -> PySpecSet:
method __or__ (line 151) | def __or__(self, other: Any) -> PySpecSet:
method _populate_version_range (line 159) | def _populate_version_range(cls, lower: Version, upper: Version) -> It...
method is_superset (line 199) | def is_superset(self, other: str | PySpecSet) -> bool:
method is_subset (line 210) | def is_subset(self, other: str | PySpecSet) -> bool:
method as_marker_string (line 220) | def as_marker_string(self) -> str:
function _convert_spec (line 229) | def _convert_spec(specifier: VersionSpecifier) -> str:
function _fix_py4k (line 259) | def _fix_py4k(spec: VersionSpecifier) -> VersionSpecifier:
FILE: src/pdm/models/venv.py
function get_venv_python (line 15) | def get_venv_python(venv: Path) -> Path:
function is_conda_venv (line 28) | def is_conda_venv(root: Path) -> bool:
class VirtualEnv (line 33) | class VirtualEnv:
method get (line 39) | def get(cls, root: Path) -> VirtualEnv | None:
method from_interpreter (line 46) | def from_interpreter(cls, interpreter: Path) -> VirtualEnv | None:
method env_vars (line 52) | def env_vars(self) -> dict[str, str]:
method venv_config (line 57) | def venv_config(self) -> dict[str, str]:
method include_system_site_packages (line 74) | def include_system_site_packages(self) -> bool:
method base_paths (line 78) | def base_paths(self) -> list[str]:
FILE: src/pdm/models/versions.py
class Version (line 19) | class Version:
method __init__ (line 35) | def __init__(self, version: tuple[VersionBit, ...] | str) -> None:
method complete (line 60) | def complete(self, complete_with: VersionBit = 0, max_bits: int = 3) -...
method bump (line 70) | def bump(self, idx: int = -1) -> Version:
method startswith (line 85) | def startswith(self, other: Version) -> bool:
method is_wildcard (line 90) | def is_wildcard(self) -> bool:
method is_prerelease (line 95) | def is_prerelease(self) -> bool:
method __str__ (line 99) | def __str__(self) -> str:
method __repr__ (line 108) | def __repr__(self) -> str:
method __eq__ (line 111) | def __eq__(self, other: Any) -> bool:
method __lt__ (line 116) | def __lt__(self, other: Any) -> bool:
method __gt__ (line 132) | def __gt__(self, other: Any) -> bool:
method __le__ (line 135) | def __le__(self, other: Any) -> bool:
method __ge__ (line 138) | def __ge__(self, other: Any) -> bool:
method __getitem__ (line 142) | def __getitem__(self, idx: int) -> VersionBit: ...
method __getitem__ (line 145) | def __getitem__(self, idx: slice) -> Version: ...
method __getitem__ (line 147) | def __getitem__(self, idx: int | slice) -> VersionBit | Version:
method __setitem__ (line 153) | def __setitem__(self, idx: int, value: VersionBit) -> None:
method __hash__ (line 160) | def __hash__(self) -> int:
method is_py2 (line 164) | def is_py2(self) -> bool:
FILE: src/pdm/models/working_set.py
class EgglinkFinder (line 15) | class EgglinkFinder(im.DistributionFinder):
method find_distributions (line 17) | def find_distributions(cls, context: im.DistributionFinder.Context = d...
method _search_paths (line 37) | def _search_paths(cls, name: str | None, paths: list[str]) -> Iterable...
function distributions (line 46) | def distributions(path: list[str]) -> Iterable[im.Distribution]:
class WorkingSet (line 61) | class WorkingSet(Mapping[str, im.Distribution]):
method __init__ (line 64) | def __init__(self, paths: list[str] | None = None, shared_paths: list[...
method __getitem__ (line 81) | def __getitem__(self, key: str) -> im.Distribution:
method is_owned (line 84) | def is_owned(self, key: str) -> bool:
method __len__ (line 87) | def __len__(self) -> int:
method __iter__ (line 90) | def __iter__(self) -> Iterator[str]:
method __repr__ (line 93) | def __repr__(self) -> str:
FILE: src/pdm/pep582/sitecustomize.py
function get_pypackages_path (line 7) | def get_pypackages_path():
function load_next_sitecustomize_py2 (line 45) | def load_next_sitecustomize_py2():
function load_next_sitecustomize_py3 (line 58) | def load_next_sitecustomize_py3():
function patch_sysconfig (line 70) | def patch_sysconfig(libpath):
function main (line 109) | def main():
FILE: src/pdm/project/config.py
function choices (line 28) | def choices(*choices: str) -> Callable[[str], str]:
function load_config (line 37) | def load_config(file_path: Path) -> dict[str, Any]:
function ensure_boolean (line 61) | def ensure_boolean(val: Any) -> bool:
function split_by_comma (line 69) | def split_by_comma(val: list[str] | str) -> list[str]:
class ConfigItem (line 80) | class ConfigItem:
method should_show (line 101) | def should_show(self) -> bool:
class Config (line 105) | class Config(MutableMapping[str, str]):
method get_defaults (line 287) | def get_defaults(cls) -> dict[str, Any]:
method env_map (line 295) | def env_map(self) -> Mapping[str, Any]:
method add_config (line 299) | def add_config(cls, name: str, item: ConfigItem) -> None:
method __init__ (line 303) | def __init__(self, config_file: Path, is_global: bool = False):
method reload (line 314) | def reload(self) -> None:
method load_theme (line 320) | def load_theme(self) -> rich.theme.Theme:
method self_data (line 326) | def self_data(self) -> dict[str, Any]:
method iter_sources (line 329) | def iter_sources(self) -> Iterator[RepositoryConfig]:
method _save_config (line 334) | def _save_config(self) -> None:
method __getitem__ (line 352) | def __getitem__(self, key: str) -> Any:
method __setitem__ (line 378) | def __setitem__(self, key: str, value: Any) -> None:
method __len__ (line 416) | def __len__(self) -> int:
method __iter__ (line 419) | def __iter__(self) -> Iterator[str]:
method __delitem__ (line 427) | def __delitem__(self, key: str) -> None:
method get_repository_config (line 460) | def get_repository_config(self, name_or_url: str, prefix: str) -> Repo...
class EnvMap (line 498) | class EnvMap(Mapping[str, Any]):
method __init__ (line 499) | def __init__(self, config_items: Mapping[str, ConfigItem]) -> None:
method __repr__ (line 502) | def __repr__(self) -> str:
method __getitem__ (line 505) | def __getitem__(self, k: str) -> Any:
method __iter__ (line 514) | def __iter__(self) -> Iterator[str]:
method __len__ (line 519) | def __len__(self) -> int:
FILE: src/pdm/project/core.py
class Project (line 62) | class Project:
method __init__ (line 75) | def __init__(
method __repr__ (line 116) | def __repr__(self) -> str:
method cache_dir (line 120) | def cache_dir(self) -> Path:
method pyproject (line 124) | def pyproject(self) -> PyProject:
method lockfile (line 128) | def lockfile(self) -> Lockfile:
method set_lockfile (line 146) | def set_lockfile(self, path: str | Path) -> None:
method config (line 154) | def config(self) -> Mapping[str, Any]:
method scripts (line 161) | def scripts(self) -> dict[str, str | dict[str, str]]:
method project_config (line 165) | def project_config(self) -> Config:
method name (line 175) | def name(self) -> str:
method python (line 179) | def python(self) -> PythonInfo:
method python (line 193) | def python(self, value: PythonInfo) -> None:
method _saved_python (line 198) | def _saved_python(self) -> str | None:
method _saved_python (line 212) | def _saved_python(self, value: str | None) -> None:
method resolve_interpreter (line 221) | def resolve_interpreter(self) -> PythonInfo:
method get_environment (line 293) | def get_environment(self) -> BaseEnvironment:
method _create_virtualenv (line 311) | def _create_virtualenv(self, python: str | None = None) -> Path:
method environment (line 328) | def environment(self) -> BaseEnvironment:
method environment (line 334) | def environment(self, value: BaseEnvironment | None) -> None:
method python_requires (line 338) | def python_requires(self) -> PySpecSet:
method get_dependencies (line 341) | def get_dependencies(
method iter_groups (line 351) | def iter_groups(self) -> Iterable[str]:
method _resolve_dependencies (line 359) | def _resolve_dependencies(
method all_dependencies (line 479) | def all_dependencies(self) -> dict[str, Sequence[Requirement]]:
method default_source (line 483) | def default_source(self) -> RepositoryConfig:
method sources (line 499) | def sources(self) -> list[RepositoryConfig]:
method get_sources (line 502) | def get_sources(self, expand_env: bool = True, include_stored: bool = ...
method get_repository (line 532) | def get_repository(
method get_locked_repository (line 548) | def get_locked_repository(self, env_spec: EnvSpec | None = None) -> Lo...
method split_extras_groups (line 556) | def split_extras_groups(self, all_groups: list[str]) -> tuple[list[str...
method locked_repository (line 569) | def locked_repository(self) -> LockedRepository:
method get_provider (line 573) | def get_provider(
method get_reporter (line 626) | def get_reporter(
method write_lockfile (line 640) | def write_lockfile(
method make_self_candidate (line 655) | def make_self_candidate(self, editable: bool = True) -> Candidate:
method is_lockfile_hash_match (line 667) | def is_lockfile_hash_match(self) -> bool:
method use_pyproject_dependencies (line 674) | def use_pyproject_dependencies(
method add_dependencies (line 735) | def add_dependencies(
method init_global_project (line 784) | def init_global_project(self) -> None:
method backend (line 792) | def backend(self) -> BuildBackend:
method cache (line 795) | def cache(self, name: str) -> Path:
method make_wheel_cache (line 804) | def make_wheel_cache(self) -> WheelCache:
method package_cache (line 810) | def package_cache(self) -> PackageCache:
method make_candidate_info_cache (line 813) | def make_candidate_info_cache(self) -> CandidateInfoCache:
method make_hash_cache (line 824) | def make_hash_cache(self) -> HashCache:
method iter_interpreters (line 829) | def iter_interpreters(
method find_interpreters (line 886) | def find_interpreters(
method _get_python_finder (line 936) | def _get_python_finder(self, search_venv: bool = True) -> Finder:
method is_distribution (line 962) | def is_distribution(self) -> bool:
method get_setting (line 973) | def get_setting(self, key: str) -> Any:
method env_or_setting (line 984) | def env_or_setting(self, var: str, key: str) -> Any:
method get_best_matching_cpython_version (line 992) | def get_best_matching_cpython_version(
method lock_targets (line 1022) | def lock_targets(self) -> list[EnvSpec]:
method get_resolver (line 1025) | def get_resolver(self, allow_uv: bool = True) -> type[Resolver]:
method get_synchronizer (line 1035) | def get_synchronizer(self, quiet: bool = False, allow_uv: bool = True)...
FILE: src/pdm/project/lockfile/__init__.py
function load_lockfile (line 38) | def load_lockfile(project: Project, path: str | Path) -> Lockfile:
FILE: src/pdm/project/lockfile/base.py
class Compatibility (line 27) | class Compatibility(enum.IntEnum):
class Lockfile (line 34) | class Lockfile(TOMLFile, metaclass=abc.ABCMeta):
method hash (line 39) | def hash(self) -> tuple[str, str]:
method update_hash (line 44) | def update_hash(self, hash_value: str, algo: str = "sha256") -> None:
method groups (line 50) | def groups(self) -> list[str] | None:
method strategy (line 56) | def strategy(self) -> set[str]:
method default_strategies (line 62) | def default_strategies(self) -> set[str]:
method apply_strategy_change (line 66) | def apply_strategy_change(self, changes: Iterable[str]) -> set[str]:
method compare_groups (line 82) | def compare_groups(self, groups: Iterable[str]) -> list[str]:
method set_data (line 88) | def set_data(self, data: Mapping[str, Any]) -> None:
method write (line 95) | def write(self, show_message: bool = True) -> None:
method __getitem__ (line 100) | def __getitem__(self, key: str) -> dict:
method compatibility (line 104) | def compatibility(self) -> Compatibility:
method format_lockfile (line 110) | def format_lockfile(self, repository: LockedRepository, groups: Iterab...
FILE: src/pdm/project/lockfile/pdmlock.py
class PDMLock (line 22) | class PDMLock(Lockfile):
method hash (line 29) | def hash(self) -> tuple[str, str]:
method file_version (line 34) | def file_version(self) -> str:
method groups (line 38) | def groups(self) -> list[str] | None:
method default_strategies (line 42) | def default_strategies(self) -> set[str]:
method strategy (line 46) | def strategy(self) -> set[str]:
method update_hash (line 58) | def update_hash(self, hash_value: str, algo: str = "sha256") -> None:
method compatibility (line 61) | def compatibility(self) -> Compatibility:
method format_lockfile (line 78) | def format_lockfile(self, repository: LockedRepository, groups: Iterab...
FILE: src/pdm/project/lockfile/pylock.py
class PyLock (line 17) | class PyLock(Lockfile):
method hash (line 21) | def hash(self) -> tuple[str, str]:
method update_hash (line 24) | def update_hash(self, hash_value: str, algo: str = "sha256") -> None:
method groups (line 28) | def groups(self) -> list[str] | None:
method default_strategies (line 32) | def default_strategies(self) -> set[str]:
method strategy (line 36) | def strategy(self) -> set[str]:
method apply_strategy_change (line 39) | def apply_strategy_change(self, changes: Iterable[str]) -> set[str]:
method format_lockfile (line 46) | def format_lockfile(self, repository: LockedRepository, groups: Iterab...
method compatibility (line 54) | def compatibility(self) -> Compatibility: # pragma: no cover
FILE: src/pdm/project/project_file.py
function _remove_empty_tables (line 15) | def _remove_empty_tables(doc: dict) -> None:
class PyProject (line 23) | class PyProject(TOMLFile):
method _parse (line 26) | def _parse(self) -> dict[str, Any]:
method open_for_write (line 31) | def open_for_write(self) -> tomlkit.TOMLDocument:
method _convert_pyproject (line 38) | def _convert_pyproject(self, data: dict[str, Any]) -> None:
method write (line 51) | def write(self, show_message: bool = True) -> None:
method is_valid (line 69) | def is_valid(self) -> bool:
method metadata (line 73) | def metadata(self) -> dict[str, Any]:
method dependency_groups (line 77) | def dependency_groups(self) -> dict[str, Any]:
method dev_dependencies (line 81) | def dev_dependencies(self) -> dict[str, list[Any]]:
method settings (line 94) | def settings(self) -> dict[str, Any]:
method build_system (line 98) | def build_system(self) -> dict[str, Any]:
method resolution (line 102) | def resolution(self) -> dict[str, Any]:
method allow_prereleases (line 109) | def allow_prereleases(self) -> bool | None:
method content_hash (line 112) | def content_hash(self, algo: str = "sha256") -> str:
method plugins (line 130) | def plugins(self) -> list[str]:
FILE: src/pdm/project/toml_file.py
class TOMLFile (line 13) | class TOMLFile:
method __init__ (line 14) | def __init__(self, path: str | Path, *, parse: bool = True, ui: termui...
method _path (line 23) | def _path(self) -> Path:
method _parse (line 26) | def _parse(self) -> dict[str, Any]:
method open_for_write (line 34) | def open_for_write(self) -> tomlkit.TOMLDocument:
method open_for_read (line 45) | def open_for_read(self) -> dict[str, Any]:
method set_data (line 51) | def set_data(self, data: dict[str, Any]) -> None:
method reload (line 56) | def reload(self) -> None:
method write (line 60) | def write(self) -> None:
method exists (line 71) | def exists(self) -> bool:
method empty (line 74) | def empty(self) -> bool:
FILE: src/pdm/pytest.py
class FileByteStream (line 76) | class FileByteStream(IteratorByteStream):
method close (line 77) | def close(self) -> None:
class LocalIndexTransport (line 81) | class LocalIndexTransport(httpx.BaseTransport):
method __init__ (line 88) | def __init__(
method get_file_path (line 99) | def get_file_path(self, path: str) -> Path | None:
method handle_request (line 111) | def handle_request(self, request: httpx.Request) -> httpx.Response:
class RepositoryData (line 133) | class RepositoryData:
method __init__ (line 134) | def __init__(self, pypi_json: Path) -> None:
method load_fixtures (line 138) | def load_fixtures(pypi_json: Path) -> dict[str, Any]:
method add_candidate (line 141) | def add_candidate(self, name: str, version: str, requires_python: str ...
method add_dependencies (line 145) | def add_dependencies(self, name: str, version: str, requirements: list...
method get_raw_dependencies (line 149) | def get_raw_dependencies(self, candidate: Candidate) -> tuple[str, lis...
class TestRepository (line 163) | class TestRepository(BaseRepository):
method __init__ (line 168) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method get_data (line 172) | def get_data(self) -> dict[str, Any]:
method _get_dependencies_from_fixture (line 175) | def _get_dependencies_from_fixture(self, candidate: Candidate) -> Cand...
method dependency_generators (line 184) | def dependency_generators(self) -> Iterable[Callable[[Candidate], Cand...
method get_hashes (line 191) | def get_hashes(self, candidate: Candidate) -> list[FileHash]:
method _find_candidates (line 194) | def _find_candidates(self, requirement: Requirement, minimal_version: ...
class Metadata (line 210) | class Metadata(dict):
method get_all (line 211) | def get_all(self, name: str, fallback: list[str] | None = None) -> lis...
method __getitem__ (line 214) | def __getitem__(self, __key: str) -> str:
class Distribution (line 218) | class Distribution:
method __init__ (line 221) | def __init__(
method metadata (line 237) | def metadata(self) -> Metadata:
method as_req (line 240) | def as_req(self) -> Requirement:
method requires (line 244) | def requires(self) -> list[str]:
method read_text (line 247) | def read_text(self, path: Path | str) -> None:
class MockWorkingSet (line 251) | class MockWorkingSet(collections.abc.MutableMapping):
method __init__ (line 256) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method add_distribution (line 259) | def add_distribution(self, dist: Distribution) -> None:
method is_owned (line 262) | def is_owned(self, key: str) -> bool:
method __getitem__ (line 265) | def __getitem__(self, key: str) -> Distribution:
method __len__ (line 268) | def __len__(self) -> int:
method __iter__ (line 271) | def __iter__(self) -> Iterator[str]:
method __setitem__ (line 274) | def __setitem__(self, key: str, value: Distribution) -> None:
method __delitem__ (line 277) | def __delitem__(self, key: str) -> None:
function build_env_wheels (line 294) | def build_env_wheels() -> Iterable[Path]:
function temp_env (line 307) | def temp_env(monkeypatch: pytest.MonkeyPatch) -> Generator[MutableMappin...
function build_env (line 318) | def build_env(build_env_wheels: Iterable[Path], tmp_path_factory: pytest...
function pypi_indexes (line 337) | def pypi_indexes() -> IndexesDefinition:
function build_test_session (line 351) | def build_test_session(pypi_indexes: IndexesDefinition) -> Callable[...,...
function remove_pep582_path_from_pythonpath (line 363) | def remove_pep582_path_from_pythonpath(pythonpath: str) -> str:
function core (line 371) | def core() -> Iterator[Core]:
function project_no_init (line 383) | def project_no_init(
function project (line 425) | def project(project_no_init: Project) -> Project:
function working_set (line 455) | def working_set(mocker: MockerFixture, repository: RepositoryData) -> Mo...
function local_finder_artifacts (line 490) | def local_finder_artifacts() -> Path:
function local_finder (line 503) | def local_finder(project_no_init: Project, local_finder_artifacts: Path)...
function repository_pypi_json (line 516) | def repository_pypi_json() -> Path:
function repository (line 529) | def repository(
class RunResult (line 548) | class RunResult:
method output (line 563) | def output(self) -> str:
method outputs (line 568) | def outputs(self) -> str:
method print (line 572) | def print(self) -> None:
class PDMCallable (line 581) | class PDMCallable(Protocol):
method __call__ (line 584) | def __call__(
function pdm (line 609) | def pdm(core: Core, monkeypatch: pytest.MonkeyPatch) -> PDMCallable:
function venv_backends (line 676) | def venv_backends(project: Project, request: SubRequest) -> None:
FILE: src/pdm/resolver/base.py
class Resolution (line 20) | class Resolution(t.NamedTuple):
method candidates (line 29) | def candidates(self) -> dict[str, Candidate]:
class Resolver (line 34) | class Resolver(abc.ABC):
method __post_init__ (line 58) | def __post_init__(self) -> None:
method resolve (line 62) | def resolve(self) -> Resolution:
method project (line 67) | def project(self) -> Project:
FILE: src/pdm/resolver/graph.py
class OrderedSet (line 16) | class OrderedSet(AbstractSet[T]):
method __init__ (line 21) | def __init__(self, iterable: Iterable[T] = ()) -> None:
method __hash__ (line 24) | def __hash__(self) -> int:
method __repr__ (line 27) | def __repr__(self) -> str:
method __str__ (line 30) | def __str__(self) -> str:
method __contains__ (line 33) | def __contains__(self, obj: object) -> bool:
method __iter__ (line 36) | def __iter__(self) -> Iterator[T]:
method __len__ (line 39) | def __len__(self) -> int:
function _identify_parent (line 44) | def _identify_parent(parent: None) -> None: ...
function _identify_parent (line 48) | def _identify_parent(parent: Candidate) -> str: ...
function _identify_parent (line 51) | def _identify_parent(parent: Candidate | None) -> str | None:
function merge_markers (line 55) | def merge_markers(result: Result[Requirement, Candidate, str]) -> dict[s...
function _build_marker (line 100) | def _build_marker(
function populate_groups (line 120) | def populate_groups(result: Result[Requirement, Candidate, str]) -> None:
FILE: src/pdm/resolver/providers.py
function get_provider (line 44) | def get_provider(strategy: str) -> type[BaseProvider]:
function register_provider (line 48) | def register_provider(strategy: str) -> Callable[[ProviderT], ProviderT]:
class BaseProvider (line 57) | class BaseProvider(AbstractProvider[Requirement, Candidate, str]):
method __init__ (line 58) | def __init__(
method requirement_preference (line 83) | def requirement_preference(self, requirement: Requirement) -> Comparable:
method identify (line 97) | def identify(self, requirement_or_candidate: Requirement | Candidate) ...
method get_preference (line 100) | def get_preference(
method locked_candidates (line 137) | def locked_candidates(self) -> dict[str, list[Candidate]]:
method overrides (line 141) | def overrides(self) -> dict[str, Requirement]:
method _is_direct_requirement (line 165) | def _is_direct_requirement(self, requirement: Requirement) -> bool:
method _find_candidates (line 172) | def _find_candidates(self, requirement: Requirement) -> Iterable[Candi...
method find_matches (line 227) | def find_matches(
method _compare_file_reqs (line 266) | def _compare_file_reqs(self, req1: FileRequirement, req2: FileRequirem...
method is_satisfied_by (line 274) | def is_satisfied_by(self, requirement: Requirement, candidate: Candida...
method _get_dependencies_from_repository (line 298) | def _get_dependencies_from_repository(self, candidate: Candidate) -> t...
method get_dependencies (line 301) | def get_dependencies(self, candidate: Candidate) -> list[Requirement]:
class ReusePinProvider (line 358) | class ReusePinProvider(BaseProvider):
method __init__ (line 365) | def __init__(
method iter_reuse_candidates (line 384) | def iter_reuse_candidates(self, identifier: str, requirement: Requirem...
method get_reuse_candidate (line 390) | def get_reuse_candidate(self, identifier: str, requirement: Requiremen...
method find_matches (line 396) | def find_matches(
method _get_dependencies_from_repository (line 417) | def _get_dependencies_from_repository(self, candidate: Candidate) -> t...
class EagerUpdateProvider (line 430) | class EagerUpdateProvider(ReusePinProvider):
method iter_reuse_candidates (line 442) | def iter_reuse_candidates(self, identifier: str, requirement: Requirem...
method get_dependencies (line 448) | def get_dependencies(self, candidate: Candidate) -> list[Requirement]:
method get_preference (line 458) | def get_preference(
class ReuseInstalledProvider (line 472) | class ReuseInstalledProvider(ReusePinProvider):
method installed (line 476) | def installed(self) -> WorkingSet:
method iter_reuse_candidates (line 479) | def iter_reuse_candidates(self, identifier: str, requirement: Requirem...
FILE: src/pdm/resolver/python.py
class PythonCandidate (line 14) | class PythonCandidate(Candidate):
method format (line 15) | def format(self) -> str:
class PythonRequirement (line 19) | class PythonRequirement(NamedRequirement):
method from_pyspec_set (line 21) | def from_pyspec_set(cls, spec: PySpecSet) -> PythonRequirement:
method as_candidate (line 24) | def as_candidate(self) -> PythonCandidate:
function find_python_matches (line 28) | def find_python_matches(
function is_python_satisfied_by (line 45) | def is_python_satisfied_by(requirement: Requirement, candidate: Candidat...
FILE: src/pdm/resolver/reporters.py
function log_title (line 22) | def log_title(title: str) -> None:
class LockReporter (line 26) | class LockReporter(BaseReporter):
method make_candidate_reporter (line 28) | def make_candidate_reporter(self, candidate: Candidate) -> Generator[C...
method starting (line 31) | def starting(self) -> Any:
method adding_requirement (line 34) | def adding_requirement(self, requirement: Requirement, parent: Candida...
method ending (line 38) | def ending(self, state: State) -> Any:
class RichLockReporter (line 52) | class RichLockReporter(LockReporter):
method __init__ (line 53) | def __init__(self, requirements: list[Requirement], ui: UI) -> None:
method make_candidate_reporter (line 75) | def make_candidate_reporter(self, candidate: Candidate) -> Generator[C...
method update (line 84) | def update(self, description: str | None = None, info: str | None = No...
method __rich_console__ (line 88) | def __rich_console__(self, console: Console, options: ConsoleOptions) ...
method start (line 92) | def start(self) -> None:
method stop (line 97) | def stop(self) -> None:
method __enter__ (line 103) | def __enter__(self) -> RichLockReporter:
method __exit__ (line 107) | def __exit__(self, *args: Any) -> None:
method starting_round (line 110) | def starting_round(self, index: int) -> None:
method starting (line 113) | def starting(self) -> None:
method ending_round (line 119) | def ending_round(self, index: int, state: State) -> None:
method rejecting_candidate (line 129) | def rejecting_candidate(self, criterion: Criterion, candidate: Candida...
method pinning (line 144) | def pinning(self, candidate: Candidate) -> None:
method resolving_conflicts (line 148) | def resolving_conflicts(self, causes: list[RequirementInformation]) ->...
FILE: src/pdm/resolver/resolvelib.py
class RLResolver (line 23) | class RLResolver(Resolver):
method __post_init__ (line 24) | def __post_init__(self) -> None:
method resolve (line 48) | def resolve(self) -> Resolution:
method _do_resolve (line 78) | def _do_resolve(self) -> dict[str, Candidate]:
FILE: src/pdm/resolver/uv.py
class UvResolver (line 32) | class UvResolver(Resolver):
method __post_init__ (line 33) | def __post_init__(self) -> None:
method _build_lock_command (line 57) | def _build_lock_command(self) -> list[str | HiddenText]:
method _parse_uv_lock (line 113) | def _parse_uv_lock(self, path: Path) -> Resolution:
method resolve (line 189) | def resolve(self) -> Resolution:
FILE: src/pdm/termui.py
function is_interactive (line 47) | def is_interactive(console: Console | None = None) -> bool:
function is_legacy_windows (line 54) | def is_legacy_windows(console: Console | None = None) -> bool:
function style (line 61) | def style(text: str, *args: str, style: str | None = None, **kwargs: Any...
function confirm (line 76) | def confirm(*args: str, **kwargs: Any) -> bool:
function ask (line 83) | def ask(*args: str, prompt_type: type[str] | type[int] | None = None, **...
class Verbosity (line 98) | class Verbosity(enum.IntEnum):
class Emoji (line 112) | class Emoji:
class DummySpinner (line 135) | class DummySpinner:
method __init__ (line 140) | def __init__(self, text: str) -> None:
method _show (line 143) | def _show(self) -> None:
method update (line 146) | def update(self, text: str) -> None:
method __enter__ (line 150) | def __enter__(self: SpinnerT) -> SpinnerT:
method __exit__ (line 154) | def __exit__(self, *args: Any) -> None:
class SilentSpinner (line 158) | class SilentSpinner(DummySpinner):
method _show (line 159) | def _show(self) -> None:
class TruncatedIO (line 163) | class TruncatedIO:
method __init__ (line 166) | def __init__(self, wrapped: IO[str], max_length: int = 100 * 1024 * 10...
method write (line 171) | def write(self, s: str) -> int:
method __getattr__ (line 180) | def __getattr__(self, name: str) -> Any:
class UI (line 184) | class UI:
method __init__ (line 189) | def __init__(
method set_verbosity (line 196) | def set_verbosity(self, verbosity: int) -> None:
method set_theme (line 203) | def set_theme(self, theme: Theme) -> None:
method echo (line 211) | def echo(
method display_columns (line 231) | def display_columns(self, rows: Sequence[Sequence[str]], header: list[...
method logging (line 258) | def logging(self, type_: str = "install") -> Iterator[logging.Logger]:
method open_spinner (line 304) | def open_spinner(self, title: str) -> Spinner:
method make_progress (line 311) | def make_progress(self, *columns: str | ProgressColumn, **kwargs: Any)...
method info (line 315) | def info(self, message: str, verbosity: Verbosity = Verbosity.NORMAL) ...
method deprecated (line 319) | def deprecated(self, message: str, verbosity: Verbosity = Verbosity.NO...
method warn (line 323) | def warn(self, message: str, verbosity: Verbosity = Verbosity.NORMAL) ...
method error (line 327) | def error(self, message: str, verbosity: Verbosity = Verbosity.QUIET) ...
method _clean_logs (line 331) | def _clean_logs(self) -> None:
FILE: src/pdm/utils.py
function parse_version (line 48) | def parse_version(version: str) -> Version:
function create_tracked_tempdir (line 55) | def create_tracked_tempdir(suffix: str | None = None, prefix: str | None...
function get_trusted_hosts (line 66) | def get_trusted_hosts(sources: list[RepositoryConfig]) -> list[str]:
function url_without_fragments (line 79) | def url_without_fragments(url: str) -> str:
function join_list_with (line 83) | def join_list_with(items: list[Any], sep: Any) -> list[Any]:
function find_project_root (line 90) | def find_project_root(cwd: str = ".") -> str | None:
function convert_hashes (line 102) | def convert_hashes(files: list[FileHash]) -> dict[str, list[str]]:
function get_user_email_from_git (line 118) | def get_user_email_from_git() -> tuple[str, str]:
function add_ssh_scheme_to_git_uri (line 136) | def add_ssh_scheme_to_git_uri(uri: str) -> str:
function atomic_open_for_write (line 150) | def atomic_open_for_write(filename: str | Path, *, mode: str = "w", enco...
function cd (line 174) | def cd(path: str | Path) -> Iterator:
function url_to_path (line 183) | def url_to_path(url: str) -> str:
function split_path_fragments (line 223) | def split_path_fragments(path: Path) -> tuple[Path, str]:
function expand_env_vars (line 229) | def expand_env_vars(credential: str, quote: bool = False, env: Mapping[s...
function expand_env_vars_in_auth (line 247) | def expand_env_vars_in_auth(url: str) -> str:
function path_replace (line 258) | def path_replace(pattern: str, replace_with: str, dest: str) -> str:
function is_path_relative_to (line 275) | def is_path_relative_to(path: str | Path, other: str | Path) -> bool:
function get_venv_like_prefix (line 283) | def get_venv_like_prefix(interpreter: str | Path) -> tuple[Path | None, ...
function find_python_in_path (line 307) | def find_python_in_path(path: str | Path) -> Path | None:
function get_rev_from_url (line 331) | def get_rev_from_url(url: str) -> str:
function normalize_name (line 341) | def normalize_name(name: str, lowercase: bool = True) -> str:
function comparable_version (line 346) | def comparable_version(version: str) -> Version:
function is_egg_link (line 381) | def is_egg_link(dist: Distribution) -> bool:
function is_editable (line 386) | def is_editable(dist: Distribution) -> bool:
function pdm_scheme (line 397) | def pdm_scheme(base: str) -> dict[str, str]:
function is_url (line 415) | def is_url(url: str) -> bool:
function fs_supports_link_method (line 421) | def fs_supports_link_method(method: str) -> bool:
function deprecation_warning (line 438) | def deprecation_warning(message: str, stacklevel: int = 1, raise_since: ...
function is_pip_compatible_with_python (line 450) | def is_pip_compatible_with_python(python_version: Version | str) -> bool:
function is_in_zipapp (line 460) | def is_in_zipapp() -> bool:
function package_installed (line 466) | def package_installed(package_name: str) -> bool:
function validate_project_name (line 475) | def validate_project_name(name: str) -> bool:
function sanitize_project_name (line 482) | def sanitize_project_name(name: str) -> str:
function is_conda_base (line 492) | def is_conda_base() -> bool:
function is_conda_base_python (line 496) | def is_conda_base_python(python: Path) -> bool:
function filtered_sources (line 507) | def filtered_sources(sources: list[RepositoryConfig], package: str | Non...
function _source_preference (line 516) | def _source_preference(package: str | None, source: RepositoryConfig) ->...
function get_file_hash (line 529) | def get_file_hash(filename: str | Path, algorithm: str = "sha256") -> str:
function convert_to_datetime (line 540) | def convert_to_datetime(value: str) -> datetime:
function get_all_installable_python_versions (line 546) | def get_all_installable_python_versions(build_dir: bool = False) -> list...
function get_class_init_params (line 563) | def get_class_init_params(klass: type) -> set[str]:
function get_requirement_from_override (line 575) | def get_requirement_from_override(name: str, value: str) -> str:
function hide_url (line 588) | def hide_url(url: str) -> HiddenText:
FILE: tasks/complete.py
function main (line 10) | def main():
FILE: tasks/max_versions.py
class PythonVersionParser (line 12) | class PythonVersionParser(HTMLParser):
method __init__ (line 13) | def __init__(self, *, convert_charrefs: bool = True) -> None:
method handle_starttag (line 19) | def handle_starttag(self, tag: str, attrs: list[tuple[str, str]]) -> N...
method handle_endtag (line 27) | def handle_endtag(self, tag: str) -> None:
method handle_data (line 34) | def handle_data(self, data: str) -> None:
function dump_python_version_module (line 39) | def dump_python_version_module(dest_file) -> None:
FILE: tasks/release.py
function echo (line 19) | def echo(*args: str, err: bool = False, **kwargs: Any):
function get_current_version (line 29) | def get_current_version() -> str:
function bump_version (line 33) | def bump_version(pre: str | None = None, major: bool = False, minor: boo...
function release (line 56) | def release(
function parse_args (line 73) | def parse_args(argv=None):
FILE: tests/cli/conftest.py
function mock_run_gpg (line 21) | def mock_run_gpg(mocker: MockerFixture):
function prepare_packages (line 31) | def prepare_packages(tmp_path: Path):
function mock_pypi (line 43) | def mock_pypi(mocker: MockerFixture):
function uploaded (line 53) | def uploaded(mocker: MockerFixture):
class PublishMock (line 65) | class PublishMock:
function mock_publish (line 72) | def mock_publish(mock_pypi, uploaded) -> PublishMock:
function _echo (line 80) | def _echo(project):
function keyring_fixture (line 98) | def keyring_fixture(mocker: MockerFixture, monkeypatch: pytest.MonkeyPat...
FILE: tests/cli/test_add.py
function test_add_package (line 12) | def test_add_package(project, working_set, dev_option, pdm):
function test_add_package_no_lock (line 23) | def test_add_package_no_lock(project, working_set, dev_option, pdm):
function test_add_command (line 33) | def test_add_command(project, pdm, mocker):
function test_add_package_to_custom_group (line 39) | def test_add_package_to_custom_group(project, working_set, pdm):
function test_add_package_to_custom_dev_group (line 49) | def test_add_package_to_custom_dev_group(project, working_set, pdm):
function test_add_editable_package (line 61) | def test_add_editable_package(project, working_set, pdm):
function test_add_editable_package_to_metadata_forbidden (line 81) | def test_add_editable_package_to_metadata_forbidden(project, pdm):
function test_non_editable_override_editable (line 90) | def test_non_editable_override_editable(project, pdm):
function test_add_editable_normal_dev_dependency (line 99) | def test_add_editable_normal_dev_dependency(project, pdm):
function test_add_dev_dependency_with_existing_editables_group (line 112) | def test_add_dev_dependency_with_existing_editables_group(project, pdm):
function test_add_remote_package_url (line 131) | def test_add_remote_package_url(project, dev_option, pdm):
function test_add_no_install (line 139) | def test_add_no_install(project, working_set, pdm):
function test_add_package_save_exact (line 146) | def test_add_package_save_exact(project, pdm):
function test_add_package_save_wildcard (line 152) | def test_add_package_save_wildcard(project, pdm):
function test_add_package_save_minimum (line 158) | def test_add_package_save_minimum(project, pdm):
function test_add_package_update_reuse (line 163) | def test_add_package_update_reuse(project, repository, pdm):
function test_add_package_update_eager (line 191) | def test_add_package_update_eager(project, repository, pdm):
function test_add_package_with_mismatch_marker (line 219) | def test_add_package_with_mismatch_marker(project, working_set, pdm):
function test_add_dependency_from_multiple_parents (line 226) | def test_add_dependency_from_multiple_parents(project, working_set, pdm):
function test_add_packages_without_self (line 233) | def test_add_packages_without_self(project, working_set, pdm):
function test_add_package_unconstrained_rewrite_specifier (line 240) | def test_add_package_unconstrained_rewrite_specifier(project, pdm):
function test_add_cached_vcs_requirement (line 254) | def test_add_cached_vcs_requirement(project, mocker, pdm):
function test_add_with_dry_run (line 273) | def test_add_with_dry_run(project, pdm):
function test_add_with_prerelease (line 281) | def test_add_with_prerelease(project, working_set, pdm):
function test_add_editable_package_with_extras (line 287) | def test_add_editable_package_with_extras(project, working_set, pdm):
function test_add_dependency_with_extras (line 298) | def test_add_dependency_with_extras(project, pdm):
function test_add_package_with_local_version (line 311) | def test_add_package_with_local_version(project, repository, working_set...
function test_add_group_to_lockfile (line 319) | def test_add_group_to_lockfile(project, working_set, pdm):
function test_add_group_to_lockfile_without_package (line 327) | def test_add_group_to_lockfile_without_package(project, working_set, pdm):
function test_add_update_reuse_installed (line 338) | def test_add_update_reuse_installed(project, working_set, repository, pdm):
function test_add_update_reuse_installed_config (line 347) | def test_add_update_reuse_installed_config(project, working_set, reposit...
function test_add_disable_cache (line 357) | def test_add_disable_cache(project, pdm, working_set):
function test_add_dependency_with_direct_minimal_versions (line 367) | def test_add_dependency_with_direct_minimal_versions(project, pdm, repos...
function test_add_group_with_normalized_name (line 377) | def test_add_group_with_normalized_name(project, pdm, working_set):
function test_add_to_dependency_group_with_include (line 390) | def test_add_to_dependency_group_with_include(project, pdm):
FILE: tests/cli/test_build.py
function get_tarball_names (line 12) | def get_tarball_names(path):
function get_wheel_names (line 17) | def get_wheel_names(path):
function test_build_command (line 22) | def test_build_command(project, pdm, mocker):
function test_build_global_project_forbidden (line 39) | def test_build_global_project_forbidden(pdm):
function test_build_single_module (line 44) | def test_build_single_module(fixture_project):
function test_build_single_module_with_readme (line 69) | def test_build_single_module_with_readme(fixture_project):
function test_build_package (line 77) | def test_build_package(fixture_project):
function test_build_src_package (line 94) | def test_build_src_package(fixture_project):
function test_build_package_include (line 107) | def test_build_package_include(fixture_project):
function test_build_src_package_by_include (line 132) | def test_build_src_package_by_include(fixture_project):
function test_build_with_config_settings (line 147) | def test_build_with_config_settings(fixture_project):
function test_cli_build_with_config_settings (line 155) | def test_cli_build_with_config_settings(fixture_project, pdm):
function test_build_with_no_isolation (line 163) | def test_build_with_no_isolation(pdm, project):
function test_build_ignoring_pip_environment (line 171) | def test_build_ignoring_pip_environment(fixture_project, monkeypatch):
FILE: tests/cli/test_cache.py
function prepare_wheel_cache (line 9) | def prepare_wheel_cache(project):
function prepare_http_cache (line 22) | def prepare_http_cache(project):
function test_cache_list (line 35) | def test_cache_list(project, pdm):
function test_cache_list_pattern (line 49) | def test_cache_list_pattern(project, pdm):
function test_cache_remove_pattern (line 67) | def test_cache_remove_pattern(project, pdm):
function test_cache_remove_wildcard (line 87) | def test_cache_remove_wildcard(project, pdm):
function test_cache_clear (line 103) | def test_cache_clear(project, pdm):
function test_cache_remove_no_pattern (line 119) | def test_cache_remove_no_pattern(project, pdm):
function test_cache_info (line 125) | def test_cache_info(project, pdm):
function test_hash_cache (line 157) | def test_hash_cache(project, url, hash):
function test_clear_package_cache (line 162) | def test_clear_package_cache(project, pdm):
FILE: tests/cli/test_completion.py
function test_completion_bash (line 4) | def test_completion_bash(pdm):
function test_completion_zsh (line 11) | def test_completion_zsh(pdm):
function test_completion_fish (line 18) | def test_completion_fish(pdm):
function test_completion_powershell (line 25) | def test_completion_powershell(pdm):
function test_completion_pwsh (line 32) | def test_completion_pwsh(pdm):
function test_completion_unsupported_shell (line 39) | def test_completion_unsupported_shell(pdm):
function test_completion_auto_detect (line 46) | def test_completion_auto_detect(pdm, monkeypatch):
function test_completion_auto_detect_unsupported (line 56) | def test_completion_auto_detect_unsupported(pdm, monkeypatch):
FILE: tests/cli/test_config.py
function test_config_command (line 7) | def test_config_command(project, pdm):
function test_config_get_command (line 17) | def test_config_get_command(project, pdm):
function test_config_set_command (line 26) | def test_config_set_command(project, pdm):
function test_config_del_command (line 39) | def test_config_del_command(project, pdm):
function test_config_env_var_shadowing (line 53) | def test_config_env_var_shadowing(project, pdm, monkeypatch):
function test_config_project_global_precedence (line 68) | def test_config_project_global_precedence(project, pdm):
function test_specify_config_file (line 76) | def test_specify_config_file(tmp_path, pdm, monkeypatch):
function test_default_repository_setting (line 89) | def test_default_repository_setting(project):
function test_repository_config_key_short (line 102) | def test_repository_config_key_short(project):
function test_repository_overwrite_default (line 113) | def test_repository_overwrite_default(project):
function test_hide_password_in_output_repository (line 126) | def test_hide_password_in_output_repository(project, pdm):
function test_hide_password_in_output_pypi (line 136) | def test_hide_password_in_output_pypi(project, pdm):
function test_config_get_repository (line 151) | def test_config_get_repository(project, pdm):
function test_config_set_repository (line 168) | def test_config_set_repository(project):
function test_config_del_repository (line 177) | def test_config_del_repository(project):
function test_config_password_save_into_keyring (line 185) | def test_config_password_save_into_keyring(project, keyring):
function test_keyring_operation_error_disables_itself (line 212) | def test_keyring_operation_error_disables_itself(project, keyring, mocker):
FILE: tests/cli/test_fix.py
function test_fix_non_existing_problem (line 5) | def test_fix_non_existing_problem(project, pdm):
function test_fix_individual_problem (line 10) | def test_fix_individual_problem(project, pdm):
function test_show_fix_command (line 18) | def test_show_fix_command(project, pdm):
function test_show_fix_command_global_project (line 28) | def test_show_fix_command_global_project(core, pdm, project_no_init):
function test_fix_project_config (line 39) | def test_fix_project_config(project, pdm):
FILE: tests/cli/test_hooks.py
function test_pre_script_fail_fast (line 15) | def test_pre_script_fail_fast(project, pdm, capfd, mocker):
function test_pre_and_post_scripts (line 30) | def test_pre_and_post_scripts(project, pdm, capfd, _echo):
function test_composite_runs_all_hooks (line 58) | def test_composite_runs_all_hooks(project, pdm, capfd, _echo):
function test_skip_all_hooks_option (line 98) | def test_skip_all_hooks_option(project, pdm, capfd, option: str, _echo):
function test_skip_option (line 151) | def test_skip_option(project, pdm, capfd, args, _echo):
function test_skip_option_default_from_env (line 188) | def test_skip_option_default_from_env(env, expected, monkeypatch):
function hooked_project (line 239) | def hooked_project(project, capfd, specs, request):
function lock (line 249) | def lock(project, capfd):
function test_hooks (line 256) | def test_hooks(hooked_project, pdm, capfd, specs: HookSpecs):
function test_skip_option_from_signal (line 264) | def test_skip_option_from_signal(hooked_project, pdm, capfd, specs: Hook...
function test_skip_all_option_from_signal (line 275) | def test_skip_all_option_from_signal(hooked_project, pdm, capfd, specs: ...
function test_skip_pre_post_option_from_signal (line 288) | def test_skip_pre_post_option_from_signal(hooked_project, pdm, capfd, sp...
FILE: tests/cli/test_info.py
function test_info_command_packages_option (line 6) | def test_info_command_packages_option(project, pdm):
function test_info_command_all_options_mutually_exclusive (line 14) | def test_info_command_all_options_mutually_exclusive(project, pdm):
function test_info_command_env_output_format (line 30) | def test_info_command_env_output_format(project, pdm):
function test_info_command_json_contains_all_fields (line 42) | def test_info_command_json_contains_all_fields(project, pdm):
function test_info_command_default_output (line 65) | def test_info_command_default_output(project, pdm):
function test_info_command_with_global_project (line 76) | def test_info_command_with_global_project(pdm, tmp_path, monkeypatch):
function test_info_command_shows_venv_info (line 84) | def test_info_command_shows_venv_info(project, pdm):
function test_info_command_non_local_environment (line 93) | def test_info_command_non_local_environment(project, pdm, mocker):
function test_info_command_global_project_prefix (line 106) | def test_info_command_global_project_prefix(project, pdm):
FILE: tests/cli/test_init.py
function enable_interactive_mode (line 14) | def enable_interactive_mode(mocker):
function test_init_validate_python_requires (line 21) | def test_init_validate_python_requires(project_no_init, pdm):
function test_init_command (line 27) | def test_init_command(project_no_init, pdm, mocker):
function test_new_command (line 52) | def test_new_command(project_no_init, pdm, mocker):
function test_init_command_library (line 78) | def test_init_command_library(project_no_init, pdm, mocker):
function test_init_non_interactive (line 109) | def test_init_non_interactive(project_no_init, pdm, mocker):
function test_init_auto_create_venv (line 145) | def test_init_auto_create_venv(project_no_init, pdm, mocker):
function test_init_auto_create_venv_specify_python (line 154) | def test_init_auto_create_venv_specify_python(project_no_init, pdm, mock...
function test_init_with_backend_default_library (line 166) | def test_init_with_backend_default_library(project_no_init, pdm):
function test_init_with_backend_default_library_non_interactive (line 171) | def test_init_with_backend_default_library_non_interactive(project_no_in...
function test_init_with_license_non_interactive (line 176) | def test_init_with_license_non_interactive(project_no_init, pdm, mocker):
function test_init_with_project_version_non_interactive (line 213) | def test_init_with_project_version_non_interactive(project_no_init, pdm,...
FILE: tests/cli/test_install.py
function test_sync_packages_with_group_all (line 9) | def test_sync_packages_with_group_all(project, working_set, pdm):
function test_sync_packages_with_all_dev (line 20) | def test_sync_packages_with_all_dev(project, working_set, pdm):
function test_sync_no_lockfile (line 31) | def test_sync_no_lockfile(project, pdm):
function test_sync_clean_packages (line 37) | def test_sync_clean_packages(project, working_set, pdm):
function test_sync_dry_run (line 49) | def test_sync_dry_run(project, working_set, pdm):
function test_sync_only_different (line 63) | def test_sync_only_different(project, working_set, pdm):
function test_sync_in_sequential_mode (line 76) | def test_sync_in_sequential_mode(project, working_set, pdm):
function test_sync_packages_with_groups (line 84) | def test_sync_packages_with_groups(project, working_set, pdm):
function test_sync_production_packages (line 94) | def test_sync_production_packages(project, working_set, prod_option, pdm):
function test_sync_without_self (line 102) | def test_sync_without_self(project, working_set, pdm):
function test_sync_with_index_change (line 108) | def test_sync_with_index_change(project, index, pdm):
function test_install_command (line 134) | def test_install_command(project, pdm, mocker):
function test_sync_command (line 142) | def test_sync_command(project, pdm, mocker):
function test_install_with_lockfile (line 150) | def test_install_with_lockfile(project, pdm):
function test_install_with_dry_run (line 163) | def test_install_with_dry_run(project, pdm, repository):
function test_install_frozen_lockfile (line 171) | def test_install_frozen_lockfile(project, pdm, working_set):
function test_install_no_lock_deprecated (line 180) | def test_install_no_lock_deprecated(project, pdm, working_set):
function test_install_check (line 190) | def test_install_check(pdm, project, repository):
function test_sync_with_clean_unselected_option (line 200) | def test_sync_with_clean_unselected_option(project, working_set, pdm):
function test_install_referencing_self_package (line 211) | def test_install_referencing_self_package(project, working_set, pdm):
function test_install_monorepo_with_rel_paths (line 220) | def test_install_monorepo_with_rel_paths(fixture_project, pdm, working_s...
function test_install_retry (line 229) | def test_install_retry(project, pdm, mocker):
function test_install_fail_fast (line 249) | def test_install_fail_fast(project, pdm, mocker):
function test_install_groups_not_in_lockfile (line 263) | def test_install_groups_not_in_lockfile(project, pdm):
function test_install_locked_groups (line 275) | def test_install_locked_groups(project, pdm, working_set):
function test_install_groups_and_lock (line 284) | def test_install_groups_and_lock(project, pdm, working_set):
function test_install_requirement_with_extras (line 295) | def test_install_requirement_with_extras(project, pdm, working_set):
function test_fix_package_type_and_update (line 303) | def test_fix_package_type_and_update(fixture_project, pdm, working_set):
function test_install_all_with_excluded_groups (line 321) | def test_install_all_with_excluded_groups(project, working_set, pdm, args):
function test_sync_all_with_excluded_groups (line 332) | def test_sync_all_with_excluded_groups(project, working_set, pdm, args):
function test_excluded_groups_ignored_if_prod_passed (line 343) | def test_excluded_groups_ignored_if_prod_passed(project, working_set, pdm):
function test_excluded_groups_ignored_if_dev_passed (line 353) | def test_excluded_groups_ignored_if_dev_passed(project, working_set, pdm):
function test_install_from_multi_target_lock (line 365) | def test_install_from_multi_target_lock(project, pdm, repository, nested...
function test_install_from_lock_with_higher_version (line 394) | def test_install_from_lock_with_higher_version(project, pdm, working_set):
function test_install_from_lock_with_lower_version (line 404) | def test_install_from_lock_with_lower_version(project, pdm, working_set):
function test_install_from_lock_with_incompatible_targets (line 416) | def test_install_from_lock_with_incompatible_targets(project, pdm, pytho...
function test_uv_install (line 426) | def test_uv_install(project, pdm):
function test_uv_install_pep582_not_allowed (line 438) | def test_uv_install_pep582_not_allowed(project, pdm):
FILE: tests/cli/test_list.py
function test_list_command (line 15) | def test_list_command(project, pdm, mocker):
function test_list_graph_command (line 23) | def test_list_graph_command(project, pdm, mocker):
function test_list_dependency_graph (line 32) | def test_list_dependency_graph(project, pdm):
function test_list_dependency_graph_include_exclude (line 42) | def test_list_dependency_graph_include_exclude(project, pdm):
function test_list_dependency_graph_with_circular_forward (line 76) | def test_list_dependency_graph_with_circular_forward(project, pdm, repos...
function test_list_dependency_graph_with_circular_reverse (line 90) | def test_list_dependency_graph_with_circular_reverse(project, pdm, repos...
function test_list_reverse_without_graph_flag (line 115) | def test_list_reverse_without_graph_flag(project, pdm):
function test_list_reverse_dependency_graph (line 128) | def test_list_reverse_dependency_graph(project, pdm):
function test_list_json (line 136) | def test_list_json(project, pdm):
function test_list_json_with_pattern (line 178) | def test_list_json_with_pattern(project, pdm):
function test_list_json_reverse (line 194) | def test_list_json_reverse(project, pdm):
function test_list_reverse_json_with_pattern (line 257) | def test_list_reverse_json_with_pattern(project, pdm):
function test_list_json_with_circular_forward (line 281) | def test_list_json_with_circular_forward(project, pdm, repository):
function test_list_json_with_circular_reverse (line 324) | def test_list_json_with_circular_reverse(project, pdm, repository):
function test_list_field_unknown (line 366) | def test_list_field_unknown(project, pdm):
function test_list_sort_unknown (line 373) | def test_list_sort_unknown(project, pdm):
function test_list_freeze_banned_options (line 380) | def test_list_freeze_banned_options(project, pdm):
function test_list_multiple_export_formats (line 427) | def test_list_multiple_export_formats(project, pdm):
function test_list_bare (line 456) | def test_list_bare(project, pdm):
function test_list_bare_sorted_name (line 472) | def test_list_bare_sorted_name(project, pdm):
function test_list_with_pattern (line 492) | def test_list_with_pattern(project, pdm):
function fake_working_set (line 507) | def fake_working_set(working_set):
function fake_metadata (line 570) | def fake_metadata(mocker, repository):
function test_list_freeze (line 586) | def test_list_freeze(project, pdm):
function test_list_bare_sorted_version (line 595) | def test_list_bare_sorted_version(project, pdm):
function test_list_bare_sorted_version_resolve (line 615) | def test_list_bare_sorted_version_resolve(project, pdm, working_set):
function test_list_bare_fields_licences (line 637) | def test_list_bare_fields_licences(project, pdm):
function test_list_csv_fields_licences (line 654) | def test_list_csv_fields_licences(project, pdm):
function test_list_json_fields_licences (line 668) | def test_list_json_fields_licences(project, pdm):
function test_list_markdown_fields_licences (line 682) | def test_list_markdown_fields_licences(project, pdm):
function test_list_csv_include_exclude_valid (line 739) | def test_list_csv_include_exclude_valid(project, pdm):
function test_list_packages_in_given_venv (line 764) | def test_list_packages_in_given_venv(project, pdm):
function test_list_csv_include_exclude (line 786) | def test_list_csv_include_exclude(project, pdm):
FILE: tests/cli/test_lock.py
function test_lock_command (line 17) | def test_lock_command(project, pdm, mocker):
function test_lock_dependencies (line 34) | def test_lock_dependencies(project, lock_format):
function test_lock_refresh (line 46) | def test_lock_refresh(pdm, project, repository, args, core, mocker):
function test_lock_refresh_keep_consistent (line 85) | def test_lock_refresh_keep_consistent(pdm, project, repository):
function test_lock_check_no_change_success (line 96) | def test_lock_check_no_change_success(pdm, project, repository):
function test_lock_check_change_fails (line 106) | def test_lock_check_change_fails(pdm, project, repository):
function test_innovations_with_specified_lockfile (line 118) | def test_innovations_with_specified_lockfile(pdm, project, working_set):
function test_skip_editable_dependencies_in_metadata (line 131) | def test_skip_editable_dependencies_in_metadata(project, capsys):
function test_lock_selected_groups (line 142) | def test_lock_selected_groups(project, pdm):
function test_lock_self_referencing_dev_groups (line 153) | def test_lock_self_referencing_dev_groups(project, pdm, to_dev):
function test_lock_self_referencing_optional_groups (line 173) | def test_lock_self_referencing_optional_groups(project, pdm):
function test_lock_include_groups_not_allowed (line 192) | def test_lock_include_groups_not_allowed(project, pdm):
function test_lock_optional_referencing_dev_group_not_allowed (line 202) | def test_lock_optional_referencing_dev_group_not_allowed(project, pdm):
function test_lock_multiple_platform_wheels (line 213) | def test_lock_multiple_platform_wheels(project, pdm):
function test_lock_specific_platform_wheels (line 224) | def test_lock_specific_platform_wheels(project, pdm, platform):
function test_parse_lock_strategy_group_options (line 235) | def test_parse_lock_strategy_group_options(core):
function test_apply_lock_strategy_changes (line 247) | def test_apply_lock_strategy_changes(project):
function test_apply_lock_strategy_changes_invalid (line 257) | def test_apply_lock_strategy_changes_invalid(project, strategy):
function test_lock_direct_minimal_versions (line 262) | def test_lock_direct_minimal_versions(project, repository, pdm):
function test_lock_direct_minimal_versions_real (line 274) | def test_lock_direct_minimal_versions_real(project, pdm, args):
function test_lockfile_compatibility (line 295) | def test_lockfile_compatibility(project, monkeypatch, lock_version, expe...
function test_lock_default_inherit_metadata (line 304) | def test_lock_default_inherit_metadata(project, pdm, mocker, working_set):
function test_lock_inherit_metadata_strategy (line 318) | def test_lock_inherit_metadata_strategy(project, pdm, mocker, working_set):
function test_lock_exclude_newer (line 332) | def test_lock_exclude_newer(project, pdm):
function test_lock_all_with_excluded_groups (line 355) | def test_lock_all_with_excluded_groups(project, pdm, args):
function test_forbidden_lock_target_options (line 374) | def test_forbidden_lock_target_options(project, pdm, args):
function test_lock_for_multiple_targets (line 381) | def test_lock_for_multiple_targets(project, pdm, repository, nested):
function test_lock_with_override_file (line 429) | def test_lock_with_override_file(project, pdm, constraint):
function test_pylock_add_remove_strategy (line 438) | def test_pylock_add_remove_strategy(project, pdm):
function test_lock_with_invalid_python_requirement (line 453) | def test_lock_with_invalid_python_requirement(project, pdm):
FILE: tests/cli/test_others.py
function test_build_distributions (line 11) | def test_build_distributions(project):
function test_project_no_init_error (line 23) | def test_project_no_init_error(project_no_init, pdm):
function test_help_option (line 30) | def test_help_option(pdm):
function test_pep582_option (line 35) | def test_pep582_option(pdm):
function test_info_command (line 40) | def test_info_command(project, pdm):
function test_info_command_json (line 55) | def test_info_command_json(project, pdm):
function test_info_global_project (line 68) | def test_info_global_project(pdm, tmp_path):
function test_info_with_multiple_venvs (line 74) | def test_info_with_multiple_venvs(pdm, project):
function test_global_project_other_location (line 91) | def test_global_project_other_location(pdm, project):
function test_uncaught_error (line 96) | def test_uncaught_error(pdm, mocker):
function test_import_other_format_file (line 114) | def test_import_other_format_file(project, pdm, filename):
function test_import_requirement_no_overwrite (line 120) | def test_import_requirement_no_overwrite(project, pdm, tmp_path):
function test_search_package (line 131) | def test_search_package(pdm, tmp_path):
function test_show_package_on_pypi (line 140) | def test_show_package_on_pypi(pdm):
function test_show_self_package (line 158) | def test_show_self_package(project, pdm):
function test_export_to_requirements_txt (line 167) | def test_export_to_requirements_txt(pdm, fixture_project):
function test_export_doesnt_include_dep_with_extras (line 205) | def test_export_doesnt_include_dep_with_extras(pdm, fixture_project, ext...
function test_completion_command (line 216) | def test_completion_command(pdm):
function test_show_update_hint (line 223) | def test_show_update_hint(pdm, project, monkeypatch):
function test_export_with_platform_markers (line 236) | def test_export_with_platform_markers(pdm, project):
function test_export_with_vcs_deps (line 254) | def test_export_with_vcs_deps(pdm, project):
function test_keep_log_on_failure (line 265) | def test_keep_log_on_failure(pdm, project, tmp_path):
function test_truncated_log_on_failure (line 274) | def test_truncated_log_on_failure(pdm, project, tmp_path, monkeypatch):
FILE: tests/cli/test_outdated.py
function test_outdated (line 10) | def test_outdated(project, pdm, index):
FILE: tests/cli/test_publish.py
function test_package_parse_metadata (line 21) | def test_package_parse_metadata(filename):
function test_parse_metadata_with_non_ascii_chars (line 38) | def test_parse_metadata_with_non_ascii_chars():
function test_package_add_signature (line 47) | def test_package_add_signature(tmp_path):
function test_package_call_gpg_sign (line 54) | def test_package_call_gpg_sign():
function test_repository_get_release_urls (line 66) | def test_repository_get_release_urls(project):
function test_publish_pick_up_asc_files (line 90) | def test_publish_pick_up_asc_files(project, uploaded, pdm):
function test_publish_package_with_signature (line 110) | def test_publish_package_with_signature(project, uploaded, pdm):
function test_publish_and_build_in_one_run (line 124) | def test_publish_and_build_in_one_run(fixture_project, pdm, mock_pypi):
function test_publish_cli_args_and_env_var_precedence (line 134) | def test_publish_cli_args_and_env_var_precedence(project, monkeypatch, m...
function test_repository_get_credentials_from_keyring (line 212) | def test_repository_get_credentials_from_keyring(project, keyring, mocker):
function test_repository_get_token_from_oidc (line 220) | def test_repository_get_token_from_oidc(project, mocker, httpx_mock):
function test_repository_get_token_from_oidc_request_error (line 243) | def test_repository_get_token_from_oidc_request_error(project, mocker, h...
function test_repository_get_token_from_oidc_unsupported_platform (line 258) | def test_repository_get_token_from_oidc_unsupported_platform(project, mo...
function test_repository_get_token_misconfigured_github (line 278) | def test_repository_get_token_misconfigured_github(project, monkeypatch,...
FILE: tests/cli/test_python.py
function mock_install (line 13) | def mock_install(mocker):
function test_install_python (line 64) | def test_install_python(project, pdm, mock_install):
function test_install_python_best_match (line 83) | def test_install_python_best_match(project, pdm, mock_install, mocker):
function test_install_python_min_match (line 95) | def test_install_python_min_match(project, pdm, mock_install, mocker):
function test_use_auto_install_missing (line 107) | def test_use_auto_install_missing(project, pdm, mock_install, mocker):
function test_use_auto_install_pick_latest (line 119) | def test_use_auto_install_pick_latest(project, pdm, mock_install, mocker):
function test_use_no_auto_install (line 133) | def test_use_no_auto_install(project, pdm, mocker):
function test_use_auto_install_strategy_max (line 142) | def test_use_auto_install_strategy_max(project, pdm, mock_install, mocker):
function test_use_auto_install_strategy_min (line 156) | def test_use_auto_install_strategy_min(project, pdm, mock_install, mocker):
function test_link_python (line 170) | def test_link_python(project, pdm):
function test_link_python_invalid_interpreter (line 187) | def test_link_python_invalid_interpreter(project, pdm):
function test_find_python (line 200) | def test_find_python(project, pdm, mock_install):
FILE: tests/cli/test_remove.py
function test_remove_command (line 7) | def test_remove_command(project, pdm, mocker):
function test_remove_editable_packages_while_keeping_normal (line 14) | def test_remove_editable_packages_while_keeping_normal(project, pdm):
function test_remove_package (line 26) | def test_remove_package(project, working_set, dev_option, pdm):
function test_remove_package_no_lock (line 34) | def test_remove_package_no_lock(project, working_set, dev_option, pdm):
function test_remove_package_with_dry_run (line 43) | def test_remove_package_with_dry_run(project, working_set, pdm):
function test_remove_package_no_sync (line 53) | def test_remove_package_no_sync(project, working_set, pdm):
function test_remove_package_not_exist (line 62) | def test_remove_package_not_exist(project, pdm):
function test_remove_package_exist_in_multi_groups (line 68) | def test_remove_package_exist_in_multi_groups(project, working_set, pdm):
function test_remove_no_package (line 78) | def test_remove_no_package(project, pdm):
function test_remove_package_wont_break_toml (line 84) | def test_remove_package_wont_break_toml(project_no_init, pdm):
function test_remove_group_not_in_lockfile (line 100) | def test_remove_group_not_in_lockfile(project, pdm, mocker):
function test_remove_exclude_non_existing_dev_group_in_lockfile (line 111) | def test_remove_exclude_non_existing_dev_group_in_lockfile(project, pdm):
function test_remove_package_with_group_include (line 120) | def test_remove_package_with_group_include(project, pdm):
FILE: tests/cli/test_run.py
function _args (line 17) | def _args(project):
function test_pep582_launcher_for_python_interpreter (line 31) | def test_pep582_launcher_for_python_interpreter(project, local_finder, p...
function test_auto_isolate_site_packages (line 44) | def test_auto_isolate_site_packages(project, pdm):
function test_run_with_site_packages (line 65) | def test_run_with_site_packages(project, pdm):
function test_run_command_not_found (line 88) | def test_run_command_not_found(pdm):
function test_run_pass_exit_code (line 94) | def test_run_pass_exit_code(pdm):
function test_run_cmd_script (line 99) | def test_run_cmd_script(project, pdm):
function test_run_cmd_script_with_array (line 106) | def test_run_cmd_script_with_array(project, pdm):
function test_run_script_pass_project_root (line 113) | def test_run_script_pass_project_root(project, pdm, capfd):
function test_run_shell_script (line 129) | def test_run_shell_script(project, pdm):
function test_run_script_with_relative_path (line 143) | def test_run_script_with_relative_path(project, pdm, capfd):
function test_run_non_existing_local_script (line 155) | def test_run_non_existing_local_script(project, pdm):
function test_run_shell_script_with_args_placeholder (line 169) | def test_run_shell_script_with_args_placeholder(project, pdm, args, expe...
function test_run_shell_script_with_args_placeholder_with_default (line 190) | def test_run_shell_script_with_args_placeholder_with_default(project, pd...
function test_run_call_script (line 204) | def test_run_call_script(project, pdm):
function test_run_script_with_extra_args (line 232) | def test_run_script_with_extra_args(project, pdm, capfd):
function test_run_script_with_args_placeholder (line 263) | def test_run_script_with_args_placeholder(project, pdm, capfd, script, a...
function test_run_script_with_args_placeholder_with_default (line 294) | def test_run_script_with_args_placeholder_with_default(project, pdm, cap...
function test_run_shell_script_with_pdm_placeholder (line 311) | def test_run_shell_script_with_pdm_placeholder(project, pdm):
function test_run_expand_env_vars (line 325) | def test_run_expand_env_vars(project, pdm, capfd, monkeypatch):
function test_run_expand_env_vars_from_config (line 354) | def test_run_expand_env_vars_from_config(project, pdm, capfd):
function test_run_script_with_env_defined (line 383) | def test_run_script_with_env_defined(project, pdm, capfd):
function test_run_script_with_dotenv_file (line 393) | def test_run_script_with_dotenv_file(project, pdm, capfd, monkeypatch):
function test_run_script_override_global_env (line 413) | def test_run_script_override_global_env(project, pdm, capfd):
function test_run_show_list_of_scripts (line 429) | def test_run_show_list_of_scripts(project, pdm):
function test_run_show_list_of_scripts_hide_internals (line 451) | def test_run_show_list_of_scripts_hide_internals(project, pdm):
function test_run_json_list_of_scripts (line 462) | def test_run_json_list_of_scripts(project, pdm):
function test_run_with_another_project_root (line 532) | def test_run_with_another_project_root(project, pdm, capfd, explicit_pyt...
function test_import_another_sitecustomize (line 549) | def test_import_another_sitecustomize(project, pdm, capfd):
function test_run_with_patched_sysconfig (line 571) | def test_run_with_patched_sysconfig(project, pdm, capfd):
function test_run_composite (line 587) | def test_run_composite(project, pdm, capfd, _echo):
function test_composite_stops_on_first_failure (line 601) | def test_composite_stops_on_first_failure(project, pdm, capfd):
function test_composite_keep_going_on_failure (line 617) | def test_composite_keep_going_on_failure(project, pdm, capfd):
function test_composite_inherit_env (line 633) | def test_composite_inherit_env(project, pdm, capfd, _echo):
function test_composite_fail_on_first_missing_task (line 662) | def test_composite_fail_on_first_missing_task(project, pdm, capfd, _echo):
function test_composite_fails_on_recursive_script (line 677) | def test_composite_fails_on_recursive_script(project, pdm):
function test_composite_runs_all_hooks (line 701) | def test_composite_runs_all_hooks(project, pdm, capfd, _echo):
function test_composite_pass_parameters_to_subtasks (line 723) | def test_composite_pass_parameters_to_subtasks(project, pdm, capfd, _args):
function test_composite_can_pass_parameters (line 745) | def test_composite_can_pass_parameters(project, pdm, capfd, _args):
function test_composite_only_pass_parameters_to_subtasks_with_args (line 774) | def test_composite_only_pass_parameters_to_subtasks_with_args(project, p...
function test_composite_only_pass_parameters_to_subtasks_with_args_with_default (line 795) | def test_composite_only_pass_parameters_to_subtasks_with_args_with_defau...
function test_composite_hooks_inherit_env (line 809) | def test_composite_hooks_inherit_env(project, pdm, capfd, _echo):
function test_composite_inherit_env_in_cascade (line 825) | def test_composite_inherit_env_in_cascade(project, pdm, capfd, _echo):
function test_composite_inherit_dotfile (line 851) | def test_composite_inherit_dotfile(project, pdm, capfd, _echo):
function test_resolve_env_vars_in_dotfile (line 869) | def test_resolve_env_vars_in_dotfile(project, pdm, capfd, _echo):
function test_composite_can_have_commands (line 882) | def test_composite_can_have_commands(project, pdm, capfd):
function test_run_shortcut (line 895) | def test_run_shortcut(project, pdm, capfd):
function test_run_shortcuts_dont_override_commands (line 907) | def test_run_shortcuts_dont_override_commands(project, pdm, capfd, mocker):
function test_run_shortcut_fail_with_usage_if_script_not_found (line 923) | def test_run_shortcut_fail_with_usage_if_script_not_found(project, pdm):
function test_empty_positional_args_still_display_usage (line 937) | def test_empty_positional_args_still_display_usage(project, pdm, args):
function test_empty_positional_args_display_help (line 943) | def test_empty_positional_args_display_help(project, pdm):
function test_run_script_changing_working_dir (line 951) | def test_run_script_changing_working_dir(project, pdm, capfd):
function test_run_script_with_inline_metadata (line 963) | def test_run_script_with_inline_metadata(project, pdm, local_finder, loc...
function test_run_script_pass_run_cwd (line 1000) | def test_run_script_pass_run_cwd(project, pdm, capfd):
function test_run_script_pass_run_cwd_to_original_working_dir_when_working_dir_of_script_is_changed (line 1016) | def test_run_script_pass_run_cwd_to_original_working_dir_when_working_di...
function test_run_script_default_verbosity (line 1033) | def test_run_script_default_verbosity(project, pdm):
function test_run_script_default_verbosity_with_show_header (line 1044) | def test_run_script_default_verbosity_with_show_header(project, pdm):
function test_run_script_default_verbosity_with_show_header_no_help (line 1057) | def test_run_script_default_verbosity_with_show_header_no_help(project, ...
function test_run_script_verbose (line 1069) | def test_run_script_verbose(project, pdm):
function test_run_composite_script_default_verbosity_with_show_header (line 1081) | def test_run_composite_script_default_verbosity_with_show_header(project...
function test_run_composite_script_default_verbosity_with_show_header_and_help (line 1100) | def test_run_composite_script_default_verbosity_with_show_header_and_hel...
function test_run_composite_script_verbose (line 1120) | def test_run_composite_script_verbose(project, pdm):
FILE: tests/cli/test_search.py
function test_print_results_empty_hits (line 6) | def test_print_results_empty_hits(mocker):
function test_print_results_with_hits (line 17) | def test_print_results_with_hits(mocker):
function test_print_results_with_installed_package (line 41) | def test_print_results_with_installed_package(mocker):
function test_print_results_with_terminal_width (line 65) | def test_print_results_with_terminal_width(mocker):
function test_print_results_unicode_error (line 81) | def test_print_results_unicode_error(mocker):
function test_search_command_deprecation_warning (line 98) | def test_search_command_deprecation_warning(pdm):
FILE: tests/cli/test_self_command.py
function mock_distribution (line 9) | def mock_distribution(metadata, entry_points=()):
function mock_pip (line 22) | def mock_pip(mocker):
function mock_all_distributions (line 28) | def mock_all_distributions(mocker):
function mock_latest_pdm_version (line 33) | def mock_latest_pdm_version(mocker):
function test_self_list (line 40) | def test_self_list(pdm):
function test_self_list_plugins (line 48) | def test_self_list_plugins(pdm):
function test_self_add (line 55) | def test_self_add(pdm, mock_pip):
function test_self_remove (line 65) | def test_self_remove(pdm, mock_pip, mocker, monkeypatch):
function test_self_update (line 109) | def test_self_update(pdm, mock_pip, mock_latest_pdm_version, args, expec...
function test_self_update_already_latest (line 120) | def test_self_update_already_latest(pdm, mock_pip, mock_latest_pdm_versi...
FILE: tests/cli/test_show.py
function test_filter_stable_with_stable_version (line 8) | def test_filter_stable_with_stable_version(mocker):
function test_filter_stable_with_prerelease_alpha (line 16) | def test_filter_stable_with_prerelease_alpha(mocker):
function test_filter_stable_with_prerelease_beta (line 23) | def test_filter_stable_with_prerelease_beta(mocker):
function test_filter_stable_with_prerelease_rc (line 30) | def test_filter_stable_with_prerelease_rc(mocker):
function test_filter_stable_with_dev_version (line 37) | def test_filter_stable_with_dev_version(mocker):
function test_show_command_with_specific_metadata_keys (line 45) | def test_show_command_with_specific_metadata_keys(pdm):
function test_show_command_with_multiple_metadata_keys (line 57) | def test_show_command_with_multiple_metadata_keys(pdm):
function test_show_command_non_distribution_project (line 64) | def test_show_command_non_distribution_project(project, pdm):
FILE: tests/cli/test_template.py
function test_non_pyproject_template_disallowed (line 9) | def test_non_pyproject_template_disallowed(project_no_init):
function test_module_project_template (line 15) | def test_module_project_template(project_no_init):
function test_module_project_template_generate_application (line 34) | def test_module_project_template_generate_application(project_no_init):
function test_package_project_template (line 49) | def test_package_project_template(project_no_init):
FILE: tests/cli/test_update.py
function test_update_packages_with_top (line 5) | def test_update_packages_with_top(project, pdm):
function test_update_command (line 11) | def test_update_command(project, pdm, mocker):
function test_update_ignore_constraints (line 18) | def test_update_ignore_constraints(project, repository, pdm):
function test_update_all_packages (line 43) | def test_update_all_packages(project, repository, pdm, strategy):
function test_update_no_lock (line 70) | def test_update_no_lock(project, working_set, repository, pdm):
function test_update_dry_run (line 80) | def test_update_dry_run(project, repository, pdm):
function test_update_top_packages_dry_run (line 105) | def test_update_top_packages_dry_run(project, repository, pdm):
function test_update_specified_packages (line 126) | def test_update_specified_packages(project, repository, pdm):
function test_update_specified_packages_eager_mode (line 148) | def test_update_specified_packages_eager_mode(project, repository, pdm):
function test_update_transitive (line 171) | def test_update_transitive(project, repository, pdm):
function test_update_transitive_nonexistent_dependencies (line 193) | def test_update_transitive_nonexistent_dependencies(project, pdm):
function test_update_package_wrong_group (line 201) | def test_update_package_wrong_group(project, pdm):
function test_update_transitive_non_transitive_dependencies (line 209) | def test_update_transitive_non_transitive_dependencies(project, reposito...
function test_update_specified_packages_eager_mode_config (line 233) | def test_update_specified_packages_eager_mode_config(project, repository...
function test_update_with_package_and_groups_argument (line 257) | def test_update_with_package_and_groups_argument(project, pdm):
function test_update_with_prerelease_without_package_argument (line 268) | def test_update_with_prerelease_without_package_argument(project, pdm):
function test_update_existing_package_with_prerelease (line 274) | def test_update_existing_package_with_prerelease(project, working_set, p...
function test_update_package_with_extras (line 295) | def test_update_package_with_extras(project, repository, working_set, pdm):
function test_update_groups_in_lockfile (line 309) | def test_update_groups_in_lockfile(project, working_set, pdm, repository):
function test_update_group_not_in_lockfile (line 320) | def test_update_group_not_in_lockfile(project, working_set, pdm):
function test_update_dependency_group_with_include (line 329) | def test_update_dependency_group_with_include(project, pdm):
FILE: tests/cli/test_use.py
function test_use_command (line 13) | def test_use_command(project, pdm):
function test_use_python_by_version (line 28) | def test_use_python_by_version(project, pdm):
function test_use_wrapper_python (line 35) | def test_use_wrapper_python(project):
function test_use_invalid_wrapper_python (line 48) | def test_use_invalid_wrapper_python(project):
function test_use_remember_last_selection (line 59) | def test_use_remember_last_selection(project, mocker):
function test_use_venv_python (line 74) | def test_use_venv_python(project, pdm):
function test_use_auto_install_and_no_auto_install_are_mutual_exclusive (line 88) | def test_use_auto_install_and_no_auto_install_are_mutual_exclusive(proje...
FILE: tests/cli/test_utils.py
function test_help_with_unknown_arguments (line 1) | def test_help_with_unknown_arguments(pdm):
function test_output_similar_command_when_typo (line 7) | def test_output_similar_command_when_typo(pdm):
FILE: tests/cli/test_venv.py
function with_pip (line 16) | def with_pip(request):
function fake_create (line 21) | def fake_create(monkeypatch):
function test_venv_create (line 34) | def test_venv_create(pdm, project):
function test_venv_create_in_project (line 45) | def test_venv_create_in_project(pdm, project):
function test_venv_create_other_location (line 56) | def test_venv_create_other_location(pdm, project):
function test_venv_show_path (line 66) | def test_venv_show_path(pdm, project):
function test_venv_list (line 79) | def test_venv_list(pdm, project):
function test_venv_remove (line 91) | def test_venv_remove(pdm, project):
function test_venv_recreate (line 108) | def test_venv_recreate(pdm, project):
function test_venv_activate (line 121) | def test_venv_activate(pdm, mocker, project):
function test_venv_activate_tcsh (line 146) | def test_venv_activate_tcsh(pdm, mocker, project):
function test_venv_activate_custom_prompt (line 159) | def test_venv_activate_custom_prompt(pdm, mocker, project):
function test_venv_activate_project_without_python (line 169) | def test_venv_activate_project_without_python(pdm, project):
function test_venv_activate_error (line 177) | def test_venv_activate_error(pdm, project):
function test_venv_activate_no_shell (line 192) | def test_venv_activate_no_shell(pdm, mocker, project):
function test_venv_auto_create (line 217) | def test_venv_auto_create(pdm, mocker, project, keep_pypackages):
function test_venv_purge (line 233) | def test_venv_purge(pdm, project):
function test_venv_purge_force (line 247) | def test_venv_purge_force(pdm, project):
function test_venv_purge_interactive (line 262) | def test_venv_purge_interactive(pdm, user_choices, is_path_exists, proje...
function test_virtualenv_backend_create (line 272) | def test_virtualenv_backend_create(project, mocker, with_pip):
function test_venv_backend_create (line 292) | def test_venv_backend_create(project, mocker, with_pip):
function test_conda_backend_create (line 310) | def test_conda_backend_create(project, mocker, with_pip):
FILE: tests/conftest.py
function index (line 28) | def index() -> dict[str, bytes]:
function disable_keyring (line 33) | def disable_keyring():
function pypi_indexes (line 38) | def pypi_indexes(index) -> IndexesDefinition:
function pytest_runtest_setup (line 54) | def pytest_runtest_setup(item):
class MockGit (line 59) | class MockGit(Git):
method fetch_new (line 60) | def fetch_new(self, location, url, rev, args):
method get_revision (line 65) | def get_revision(self, location: Path) -> str:
method is_immutable_revision (line 68) | def is_immutable_revision(self, location, link) -> bool:
function repository_pypi_json (line 74) | def repository_pypi_json() -> Path:
function build_env_wheels (line 79) | def build_env_wheels() -> Iterable[Path]:
function local_finder_artifacts (line 97) | def local_finder_artifacts() -> Path:
function copytree (line 101) | def copytree(src: Path, dst: Path) -> None:
function fixture_project (line 112) | def fixture_project(project_no_init: Project, request: pytest.FixtureReq...
function vcs (line 137) | def vcs(monkeypatch):
function is_editable (line 143) | def is_editable(request):
function dev_option (line 148) | def dev_option(request) -> Iterable[str]:
FILE: tests/environments/test_environment.py
function local_env (line 13) | def local_env(project):
function test_packages_path_compat_suffix_32 (line 19) | def test_packages_path_compat_suffix_32(local_env, tmp_path, monkeypatch):
function test_local_get_paths_headers_override (line 31) | def test_local_get_paths_headers_override(local_env):
function test_pip_command_uses_existing_module (line 43) | def test_pip_command_uses_existing_module(monkeypatch, project):
function test_pip_command_download_fallback (line 67) | def test_pip_command_download_fallback(monkeypatch, project):
function test_pip_command_installed (line 104) | def test_pip_command_installed(monkeypatch, project):
function test_script_kind_posix (line 117) | def test_script_kind_posix(local_env):
function test_which_python_variants (line 123) | def test_which_python_variants(local_env):
function test_process_env_includes_scripts_first (line 131) | def test_process_env_includes_scripts_first(local_env):
FILE: tests/environments/test_shebangs.py
function test_get_shebang_path (line 20) | def test_get_shebang_path(executable, is_launcher, expected):
function test_is_console_script_unix_and_binary (line 24) | def test_is_console_script_unix_and_binary():
function test_replace_shebang_unix (line 43) | def test_replace_shebang_unix(tmp_path: Path, content: bytes, new_exec: ...
function test_update_shebangs_changes_scripts_header (line 51) | def test_update_shebangs_changes_scripts_header(project):
function test_update_shebangs_ignores_non_target_files_and_dirs (line 66) | def test_update_shebangs_ignores_non_target_files_and_dirs(project):
function test_replace_shebang_early_return_when_not_console (line 83) | def test_replace_shebang_early_return_when_not_console(tmp_path: Path):
function _zip_with_main_bytes (line 91) | def _zip_with_main_bytes() -> bytes:
function test_is_console_script_windows_zip (line 98) | def test_is_console_script_windows_zip(monkeypatch):
function test_is_console_script_windows_text_shebang (line 106) | def test_is_console_script_windows_text_shebang(monkeypatch):
function test_replace_shebang_windows_zip_no_change (line 112) | def test_replace_shebang_windows_zip_no_change(monkeypatch, tmp_path: Pa...
FILE: tests/fixtures/projects/test-plugin-pdm/hello.py
class HelloCommand (line 4) | class HelloCommand(BaseCommand):
method add_arguments (line 7) | def add_arguments(self, parser):
method handle (line 10) | def handle(self, project, options):
function main (line 14) | def main(core):
FILE: tests/fixtures/projects/test-plugin/hello.py
class HelloCommand (line 4) | class HelloCommand(BaseCommand):
method add_arguments (line 7) | def add_arguments(self, parser):
method handle (line 10) | def handle(self, project, options):
function main (line 14) | def main(core):
FILE: tests/models/test_backends.py
function _setup_backend (line 12) | def _setup_backend(project: Project, backend: str):
function test_project_backend (line 30) | def test_project_backend(project, working_set, backend, pdm):
function test_hatch_expand_variables (line 55) | def test_hatch_expand_variables(monkeypatch):
function test_pdm_backend_expand_variables (line 66) | def test_pdm_backend_expand_variables(monkeypatch):
function test_get_relative_path (line 87) | def test_get_relative_path(url, path):
FILE: tests/models/test_candidates.py
function to_lines (line 16) | def to_lines(requirements: list[Requirement]) -> list[str]:
function test_parse_local_directory_metadata (line 21) | def test_parse_local_directory_metadata(project, is_editable):
function test_parse_vcs_metadata (line 34) | def test_parse_vcs_metadata(project, is_editable):
function test_parse_artifact_metadata (line 60) | def test_parse_artifact_metadata(requirement_line, project):
function test_parse_metadata_with_extras (line 72) | def test_parse_metadata_with_extras(project):
function test_parse_remote_link_metadata (line 86) | def test_parse_remote_link_metadata(project):
function test_expand_project_root_in_url (line 111) | def test_expand_project_root_in_url(req_str, core):
function test_parse_project_file_on_build_error (line 131) | def test_parse_project_file_on_build_error(project):
function test_parse_project_file_on_build_error_with_extras (line 143) | def test_parse_project_file_on_build_error_with_extras(project):
function test_parse_project_file_on_build_error_no_dep (line 155) | def test_parse_project_file_on_build_error_no_dep(project):
function test_parse_poetry_project_metadata (line 164) | def test_parse_poetry_project_metadata(project, is_editable):
function test_parse_flit_project_metadata (line 174) | def test_parse_flit_project_metadata(project, is_editable):
function test_vcs_candidate_in_subdirectory (line 186) | def test_vcs_candidate_in_subdirectory(project, is_editable):
function test_sdist_candidate_with_wheel_cache (line 203) | def test_sdist_candidate_with_wheel_cache(project, mocker):
function test_cache_vcs_immutable_revision (line 226) | def test_cache_vcs_immutable_revision(project):
function test_cache_egg_info_sdist (line 246) | def test_cache_egg_info_sdist(project):
function test_invalidate_incompatible_wheel_link (line 253) | def test_invalidate_incompatible_wheel_link(project):
function test_legacy_pep345_tag_link (line 271) | def test_legacy_pep345_tag_link(project):
function test_ignore_invalid_py_version (line 279) | def test_ignore_invalid_py_version(project):
function test_find_candidates_from_find_links (line 286) | def test_find_candidates_from_find_links(project):
function test_parse_metadata_from_pep621 (line 297) | def test_parse_metadata_from_pep621(project, mocker):
function test_parse_metadata_with_dynamic_fields (line 307) | def test_parse_metadata_with_dynamic_fields(project, local_finder):
function test_get_metadata_for_non_existing_path (line 315) | def test_get_metadata_for_non_existing_path(project):
FILE: tests/models/test_marker.py
function test_split_pyspec (line 26) | def test_split_pyspec(original, marker, py_spec):
function test_match_env_spec (line 52) | def test_match_env_spec(marker, env_spec, expected):
FILE: tests/models/test_requirements.py
function filter_requirements_to_lines (line 70) | def filter_requirements_to_lines(
function test_convert_req_dict_to_req_line (line 80) | def test_convert_req_dict_to_req_line(req, result):
function test_illegal_requirement_line (line 93) | def test_illegal_requirement_line(line, expected):
function test_not_supported_editable_requirement (line 99) | def test_not_supported_editable_requirement(line):
function test_filter_requirements_with_extras (line 104) | def test_filter_requirements_with_extras():
FILE: tests/models/test_session.py
function test_session_sources_all_proxy (line 9) | def test_session_sources_all_proxy(project: Project, mocker, monkeypatch):
FILE: tests/models/test_setup_parsing.py
function test_parse_setup_cfg (line 41) | def test_parse_setup_cfg(content, result, tmp_path):
function test_parse_setup_py (line 98) | def test_parse_setup_py(content, result, tmp_path):
function test_parse_pyproject_toml (line 103) | def test_parse_pyproject_toml(tmp_path):
FILE: tests/models/test_setup_parsing_extra.py
function test_setup_update_truthiness_semantics (line 11) | def test_setup_update_truthiness_semantics():
function test_parse_setup_py_with_kwargs_dict_and_variables (line 20) | def test_parse_setup_py_with_kwargs_dict_and_variables(tmp_path):
function test_setup_as_dict (line 42) | def test_setup_as_dict():
function test_parse_setup_py_no_setup_call_branches (line 77) | def test_parse_setup_py_no_setup_call_branches(tmp_path, content):
function test_parse_setup_py_irrelevant_call_and_assignment (line 82) | def test_parse_setup_py_irrelevant_call_and_assignment(tmp_path):
function test_parse_setup_cfg_missing_sections_and_options (line 111) | def test_parse_setup_cfg_missing_sections_and_options(tmp_path, content,...
function test_find_setup_call_in_function_and_if_main (line 116) | def test_find_setup_call_in_function_and_if_main(tmp_path):
function test_if_main_direct_setup_hits_concat_body_return (line 132) | def test_if_main_direct_setup_hits_concat_body_return(tmp_path):
function test_from_directory_precedence_and_falsy_update (line 144) | def test_from_directory_precedence_and_falsy_update(tmp_path):
function test_read_pyproject_toml_project_error_returns_empty (line 192) | def test_read_pyproject_toml_project_error_returns_empty(tmp_path, mocker):
function test_read_pyproject_toml_metaconverter_error_uses_partial_data_and_logs (line 202) | def test_read_pyproject_toml_metaconverter_error_uses_partial_data_and_l...
function test_setup_distribution_metadata_and_requires_markers (line 235) | def test_setup_distribution_metadata_and_requires_markers():
function test_read_text_and_locate_file_smoke (line 274) | def test_read_text_and_locate_file_smoke():
function test_find_setup_call_skips_non_call_expr_then_finds_setup (line 283) | def test_find_setup_call_skips_non_call_expr_then_finds_setup(tmp_path):
function test_find_setup_call_skips_non_functiondef_element_then_finds_setup (line 295) | def test_find_setup_call_skips_non_functiondef_element_then_finds_setup(...
function test_find_setup_call_skips_non_setup_call_then_finds_setup (line 307) | def test_find_setup_call_skips_non_setup_call_then_finds_setup(tmp_path):
function test_install_requires_name_resolves_to_non_list (line 320) | def test_install_requires_name_resolves_to_non_list(tmp_path):
function test_extras_require_name_is_undefined_returns_empty (line 334) | def test_extras_require_name_is_undefined_returns_empty(tmp_path):
function test_extras_require_name_resolves_to_non_dict (line 346) | def test_extras_require_name_resolves_to_non_dict(tmp_path):
function test_single_string_name_variable_not_string (line 359) | def test_single_string_name_variable_not_string(tmp_path):
function test_extras_require_from_kwargs_non_dict_non_call_returns_empty (line 372) | def test_extras_require_from_kwargs_non_dict_non_call_returns_empty(tmp_...
function test_extras_require_from_kwargs_call_func_is_attribute_returns_empty (line 386) | def test_extras_require_from_kwargs_call_func_is_attribute_returns_empty...
function test_extras_require_from_kwargs_call_func_name_not_dict_returns_empty (line 403) | def test_extras_require_from_kwargs_call_func_name_not_dict_returns_empt...
FILE: tests/models/test_specifiers.py
function test_normalize_pyspec (line 27) | def test_normalize_pyspec(original, normalized):
function test_pyspec_and_op (line 44) | def test_pyspec_and_op(left, right, result):
function test_pyspec_or_op (line 62) | def test_pyspec_or_op(left, right, result):
function test_impossible_pyspec (line 68) | def test_impossible_pyspec():
function test_pyspec_is_subset_superset (line 92) | def test_pyspec_is_subset_superset(left, right):
function test_pyspec_isnot_subset_superset (line 109) | def test_pyspec_isnot_subset_superset(left, right):
FILE: tests/models/test_versions.py
function test_unsupported_post_version (line 6) | def test_unsupported_post_version() -> None:
function test_support_prerelease_version (line 11) | def test_support_prerelease_version() -> None:
function test_normalize_non_standard_version (line 21) | def test_normalize_non_standard_version():
function test_version_comparison (line 26) | def test_version_comparison():
function test_version_is_wildcard (line 39) | def test_version_is_wildcard():
function test_version_is_py2 (line 44) | def test_version_is_py2():
function test_version_complete (line 53) | def test_version_complete(version, args, result):
function test_version_bump (line 66) | def test_version_bump(version, idx, result):
function test_version_startswith (line 79) | def test_version_startswith(version, other, result):
function test_version_getitem (line 83) | def test_version_getitem():
function test_version_setitem (line 92) | def test_version_setitem():
FILE: tests/resolver/test_graph.py
function test_ordered_set (line 6) | def test_ordered_set():
FILE: tests/resolver/test_resolve.py
function resolve (line 16) | def resolve(project, repository):
function test_resolve_named_requirement (line 65) | def test_resolve_named_requirement(resolve):
function test_resolve_exclude (line 75) | def test_resolve_exclude(resolve, project):
function test_resolve_requires_python (line 86) | def test_resolve_requires_python(resolve, project):
function test_resolve_allow_prereleases (line 103) | def test_resolve_allow_prereleases(resolve, repository):
function test_resolve_prereleases_if_disabled_by_project (line 124) | def test_resolve_prereleases_if_disabled_by_project(resolve):
function test_resolve_with_extras (line 129) | def test_resolve_with_extras(resolve):
function test_resolve_with_extras_and_excludes (line 139) | def test_resolve_with_extras_and_excludes(resolve, project):
function test_resolve_local_artifacts (line 155) | def test_resolve_local_artifacts(resolve, requirement_line):
function test_resolve_vcs_and_local_requirements (line 167) | def test_resolve_vcs_and_local_requirements(resolve, line, is_editable, ...
function test_resolve_vcs_without_explicit_name (line 173) | def test_resolve_vcs_without_explicit_name(resolve, vcs):
function test_resolve_local_and_named_requirement (line 179) | def test_resolve_local_and_named_requirement(resolve, vcs):
function test_resolving_auto_avoid_conflicts (line 189) | def test_resolving_auto_avoid_conflicts(resolve, repository):
function test_resolve_conflicting_dependencies (line 205) | def test_resolve_conflicting_dependencies(resolve, repository):
function test_resolve_conflicting_dependencies_with_overrides (line 217) | def test_resolve_conflicting_dependencies_with_overrides(project, resolv...
function test_resolve_no_available_versions (line 233) | def test_resolve_no_available_versions(resolve, repository):
function test_exclude_incompatible_requirements (line 239) | def test_exclude_incompatible_requirements(resolve, repository):
function test_union_markers_from_different_parents (line 246) | def test_union_markers_from_different_parents(resolve, repository):
function test_requirements_from_different_groups (line 254) | def test_requirements_from_different_groups(resolve, repository):
function test_resolve_two_extras_from_the_same_package (line 262) | def test_resolve_two_extras_from_the_same_package(resolve):
function test_resolve_package_with_dummy_upbound (line 270) | def test_resolve_package_with_dummy_upbound(resolve, repository):
function test_resolve_dependency_with_extra_marker (line 276) | def test_resolve_dependency_with_extra_marker(resolve, repository):
function test_resolve_circular_dependencies (line 286) | def test_resolve_circular_dependencies(resolve, repository):
function test_resolve_candidates_to_install (line 296) | def test_resolve_candidates_to_install(project):
function test_resolve_prefer_requirement_with_prereleases (line 340) | def test_resolve_prefer_requirement_with_prereleases(resolve):
function test_resolve_with_python_marker (line 345) | def test_resolve_with_python_marker(resolve):
function test_resolve_file_req_with_prerelease (line 350) | def test_resolve_file_req_with_prerelease(resolve, vcs):
function test_resolve_extra_requirements_no_break_constraints (line 362) | def test_resolve_extra_requirements_no_break_constraints(resolve, reposi...
function test_resolve_extra_and_underlying_to_the_same_version (line 372) | def test_resolve_extra_and_underlying_to_the_same_version(resolve, repos...
function test_resolve_skip_candidate_with_invalid_metadata (line 383) | def test_resolve_skip_candidate_with_invalid_metadata(resolve, repository):
function test_resolve_direct_minimal_versions (line 390) | def test_resolve_direct_minimal_versions(resolve, repository, project):
function test_resolve_record_markers (line 398) | def test_resolve_record_markers(resolve, repository, project):
function test_requirement_from_override (line 441) | def test_requirement_from_override(name, value, output):
FILE: tests/resolver/test_uv_resolver.py
function resolve (line 11) | def resolve(environment, requirements, target=None):
function test_resolve_requirements (line 31) | def test_resolve_requirements(project):
function test_resolve_vcs_requirement (line 39) | def test_resolve_vcs_requirement(project):
function test_resolve_with_python_requires (line 47) | def test_resolve_with_python_requires(project):
function test_resolve_dependencies_with_nested_extras (line 60) | def test_resolve_dependencies_with_nested_extras(project):
function test_resolve_dependencies_with_overrides (line 76) | def test_resolve_dependencies_with_overrides(project, overrides):
function test_parse_uv_lock_with_source_url_fallback (line 87) | def test_parse_uv_lock_with_source_url_fallback(project):
FILE: tests/test_formats.py
function ns (line 12) | def ns(**kwargs):
function
Condensed preview — 373 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,997K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 2105,
"preview": "name: \"Bug report\"\ndescription: Create a report to help us improve\nlabels: ['🐛 bug']\nbody:\n - type: markdown\n attrib"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 1554,
"preview": "name: \"Feature / Enhancement Proposal\"\ndescription: Suggest an idea for this project\nlabels: ['⭐ enhancement']\nbody:\n -"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 181,
"preview": "## Pull Request Checklist\n\n- [ ] A news fragment is added in `news/` describing what is new.\n- [ ] Test cases added for "
},
{
"path": ".github/dependabot.yml",
"chars": 277,
"preview": "version: 2\r\nupdates:\r\n # Maintain dependencies for workflow actions\r\n - package-ecosystem: \"github-actions\"\r\n direc"
},
{
"path": ".github/workflows/ci.yml",
"chars": 3368,
"preview": "name: Tests\n\non:\n pull_request:\n branches:\n - main\n - dev\n - \"maintain/*\"\n paths-ignore:\n - \""
},
{
"path": ".github/workflows/claude.yml",
"chars": 2316,
"preview": "name: Claude Code\n\non:\n issue_comment:\n types: [created]\n pull_request_review_comment:\n types: [created]\n issue"
},
{
"path": ".github/workflows/release.yml",
"chars": 4896,
"preview": "name: Release\n\non:\n push:\n tags:\n - \"*\"\n\ndefaults:\n run:\n # make sure to work on Windows\n shell: bash\n\nj"
},
{
"path": ".gitignore",
"chars": 1957,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
},
{
"path": ".pre-commit-config.yaml",
"chars": 671,
"preview": "ci:\n autoupdate_schedule: monthly\nrepos:\n - repo: https://github.com/astral-sh/ruff-pre-commit\n rev: 'v0.15.4'\n "
},
{
"path": ".pre-commit-hooks.yaml",
"chars": 704,
"preview": "- id: pdm-lock-check\n name: pdm-lock-check\n description: run pdm lock --check to validate config\n entry: pdm lock --c"
},
{
"path": ".readthedocs.yaml",
"chars": 535,
"preview": "# Read the Docs configuration file for MkDocs projects\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html f"
},
{
"path": "AGENTS.md",
"chars": 3603,
"preview": "# AGENTS.md\n\nThis file provides guidance to AI coding assistants when working with code in this repository.\n\n## Project "
},
{
"path": "CHANGELOG.md",
"chars": 198919,
"preview": "## Release v2.26.6 (2026-01-22)\n\n### Bug Fixes\n\n- Support `packaging==26.0` changes for version comparison ([#3729](http"
},
{
"path": "CONTRIBUTING.md",
"chars": 4789,
"preview": "# Contributing to PDM\n\nFirst off, thanks for taking the time to contribute! Contributions include but are not restricted"
},
{
"path": "LICENSE",
"chars": 1075,
"preview": "MIT License\n\nCopyright (c) 2019-present Frost Ming\n\nPermission is hereby granted, free of charge, to any person obtainin"
},
{
"path": "README.md",
"chars": 7072,
"preview": "<div align=\"center\">\n\n# PDM\n\nA modern Python package and dependency manager supporting the latest PEP standards.\n[中文版本说明"
},
{
"path": "README_zh.md",
"chars": 4349,
"preview": "<div align=\"center\">\n\n# PDM\n\n一个现代的 Python 包管理器,支持 PEP 最新标准。[English version README](README.md)\n\n {\n const expansionRepo = 'https://github.com/pdm-project/pdm-"
},
{
"path": "docs/dev/benchmark.md",
"chars": 201,
"preview": "# Benchmark\n\nThis page has been removed, please visit [Python Package Manager Shootout by Lincoln Loop](https://lincolnl"
},
{
"path": "docs/dev/changelog.md",
"chars": 145,
"preview": "# Changelog\n\n!!! warning \"Attention\"\n Major and minor releases also include changes listed within prior beta releases"
},
{
"path": "docs/dev/contributing.md",
"chars": 25,
"preview": "--8<-- \"CONTRIBUTING.md\"\n"
},
{
"path": "docs/dev/fixtures.md",
"chars": 159,
"preview": "# Pytest fixtures\n\n::: pdm.pytest\n options:\n show_source: false\n show_root_heading: false\n show_root_t"
},
{
"path": "docs/dev/write.md",
"chars": 8185,
"preview": "# PDM Plugins\n\nPDM is aiming at being a community driven package manager.\nIt is shipped with a full-featured plug-in sys"
},
{
"path": "docs/index.md",
"chars": 8972,
"preview": "<div align=\"center\">\n<img src=\"assets/logo_big.png\" alt=\"PDM logo\">\n</div>\n\n# Introduction\n\nPDM, as described, is a mode"
},
{
"path": "docs/overrides/main.html",
"chars": 257,
"preview": "{% extends 'base.html' %}\n\n{% block announce %}\n<span class=\"twemoji\" style=\"vertical-align: middle;\">\n {% include \".ic"
},
{
"path": "docs/reference/api.md",
"chars": 314,
"preview": "# API Reference\n\n::: pdm.core.Core\n options:\n show_root_heading: yes\n show_source: false\n heading_leve"
},
{
"path": "docs/reference/build.md",
"chars": 2113,
"preview": "# Build Configuration\n\n`pdm` uses the [PEP 517](https://www.python.org/dev/peps/pep-0517/) to build the package. It acts"
},
{
"path": "docs/reference/cli.md",
"chars": 2334,
"preview": "# CLI Reference\n\n```python exec=\"1\" idprefix=\"\"\nimport argparse\nimport re\nfrom pdm.core import Core\n\nparser = Core().par"
},
{
"path": "docs/reference/configuration.md",
"chars": 4214,
"preview": "# Configurations\n\n[pdm-config]: ../reference/cli.md#config\n\n## Color Theme\n\nThe default theme used by PDM is as follows:"
},
{
"path": "docs/reference/pep621.md",
"chars": 6562,
"preview": "# PEP 621 Metadata\n\nThe project metadata are stored in the `pyproject.toml`. The specifications are defined by [PEP 621]"
},
{
"path": "docs/usage/advanced.md",
"chars": 8982,
"preview": "# Advanced Usage\n\n## Automatic Testing\n\n### Use Tox as the runner\n\n[Tox](https://tox.readthedocs.io/en/latest/) is a gre"
},
{
"path": "docs/usage/config.md",
"chars": 15670,
"preview": "# Configure the Project\n\nPDM's `config` command works just like `git config`, except that `--list` isn't needed to\nshow "
},
{
"path": "docs/usage/dependency.md",
"chars": 17925,
"preview": "# Manage Dependencies\n\nPDM provides a bunch of useful commands to help manage your project and dependencies.\nThe followi"
},
{
"path": "docs/usage/hooks.md",
"chars": 8104,
"preview": "# Lifecycle and Hooks\n\nAs any Python deliverable, your project will go through the different phases\nof a Python project "
},
{
"path": "docs/usage/lock-targets.md",
"chars": 5754,
"preview": "# Lock for specific platforms or Python versions\n\n+++ 2.17.0\n\nBy default, PDM will try to make a lock file that works on"
},
{
"path": "docs/usage/lockfile.md",
"chars": 12985,
"preview": "# Lock file\n\nPDM installs packages exclusively from the existing lock file named `pdm.lock`. This file serves as the sol"
},
{
"path": "docs/usage/pep582.md",
"chars": 9469,
"preview": "# Working with PEP 582\n\n!!! warning \"PEP 582 has been rejected\"\n This is a rejected PEP. However, due to the fact tha"
},
{
"path": "docs/usage/project.md",
"chars": 11656,
"preview": "# New Project\n\nTo start with, create a new project with [`pdm new`](../reference/cli.md#new):\n\n```bash\npdm new my-projec"
},
{
"path": "docs/usage/publish.md",
"chars": 2262,
"preview": "# Build and Publish\n\nIf you are developing a library, after adding dependencies to your project, and finishing the codin"
},
{
"path": "docs/usage/scripts.md",
"chars": 15821,
"preview": "# PDM Scripts\n\nLike `npm run`, with PDM, you can run arbitrary scripts or commands with local packages loaded.\n\n## Arbit"
},
{
"path": "docs/usage/template.md",
"chars": 3343,
"preview": "# Create Project From a Template\n\nSimilar to `yarn create` and `npm create`, PDM also supports initializing or creating "
},
{
"path": "docs/usage/uv.md",
"chars": 1474,
"preview": "# Use uv (Experimental)\n\n+++ 2.19.0\n\nPDM has experimental support for [uv](https://github.com/astral-sh/uv) as the resol"
},
{
"path": "docs/usage/venv.md",
"chars": 9178,
"preview": "# Working with Virtual Environments\n\nWhen you run [`pdm init`](../reference/cli.md#init) command, PDM will [ask for the "
},
{
"path": "install-pdm.ps1",
"chars": 11402,
"preview": "#!/usr/bin/env pwsh\n<#\n.SYNOPSIS\n PDM Installer Script for Windows\n Downloads and installs PDM from GitHub release"
},
{
"path": "install-pdm.py",
"chars": 14869,
"preview": "from __future__ import annotations\n\nimport argparse\nimport dataclasses\nimport io\nimport json\nimport os\nimport platform\ni"
},
{
"path": "install-pdm.py.sha256",
"chars": 81,
"preview": "619d9d97d4085b3a244055d45aa191caceb586f8aaa694e0db8842171f5c9db9 install-pdm.py\n"
},
{
"path": "install-pdm.sh",
"chars": 11047,
"preview": "#!/usr/bin/env bash\nset -euo pipefail\n\n# PDM Installer Script\n# Downloads and installs PDM from GitHub released binaries"
},
{
"path": "mkdocs.yml",
"chars": 3813,
"preview": "site_name: PDM\nsite_url: https://pdm-project.org\n\nrepo_url: https://github.com/pdm-project/pdm\nedit_uri: edit/main/docs\n"
},
{
"path": "news/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "news/3541.misc.md",
"chars": 97,
"preview": "Add comprehensive tests for completion, show, search, and info commands to improve test coverage\n"
},
{
"path": "pyproject.toml",
"chars": 6498,
"preview": "[build-system]\nrequires = [\"pdm-backend\", \"pdm-build-locked\"]\nbuild-backend = \"pdm.backend\"\n\n[project]\n# PEP 621 project"
},
{
"path": "src/pdm/__init__.py",
"chars": 67,
"preview": "import pkgutil\n\n__path__ = pkgutil.extend_path(__path__, __name__)\n"
},
{
"path": "src/pdm/__main__.py",
"chars": 65,
"preview": "from pdm.core import main\n\nif __name__ == \"__main__\":\n main()\n"
},
{
"path": "src/pdm/__version__.py",
"chars": 309,
"preview": "from pdm.compat import importlib_metadata, resources_read_text\n\n\ndef read_version() -> str:\n try:\n return impo"
},
{
"path": "src/pdm/_types.py",
"chars": 4552,
"preview": "from __future__ import annotations\n\nimport dataclasses as dc\nimport re\nfrom typing import TYPE_CHECKING, Any, NamedTuple"
},
{
"path": "src/pdm/builders/__init__.py",
"chars": 201,
"preview": "from pdm.builders.editable import EditableBuilder\nfrom pdm.builders.sdist import SdistBuilder\nfrom pdm.builders.wheel im"
},
{
"path": "src/pdm/builders/base.py",
"chars": 12672,
"preview": "from __future__ import annotations\n\nimport functools\nimport logging\nimport os\nimport shutil\nimport subprocess\nimport tex"
},
{
"path": "src/pdm/builders/editable.py",
"chars": 1060,
"preview": "from __future__ import annotations\n\nimport os\n\nfrom pdm.builders.base import EnvBuilder, wrap_error\n\n\nclass EditableBuil"
},
{
"path": "src/pdm/builders/sdist.py",
"chars": 611,
"preview": "from __future__ import annotations\n\nimport os\n\nfrom pdm.builders.base import EnvBuilder, wrap_error\n\n\nclass SdistBuilder"
},
{
"path": "src/pdm/builders/wheel.py",
"chars": 1042,
"preview": "from __future__ import annotations\n\nimport os\n\nfrom pdm.builders.base import EnvBuilder, wrap_error\n\n\nclass WheelBuilder"
},
{
"path": "src/pdm/cli/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/cli/actions.py",
"chars": 20111,
"preview": "from __future__ import annotations\n\nimport contextlib\nimport datetime\nimport hashlib\nimport inspect\nimport json\nimport o"
},
{
"path": "src/pdm/cli/commands/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/cli/commands/add.py",
"chars": 7131,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom typing import TYPE_CHECKING\n\nfrom pdm.cli.commands.base import "
},
{
"path": "src/pdm/cli/commands/base.py",
"chars": 2310,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom argparse import _SubParsersAction\nfrom typing import Any, Seque"
},
{
"path": "src/pdm/cli/commands/build.py",
"chars": 5765,
"preview": "from __future__ import annotations\n\nimport argparse\nimport os\nimport shutil\nimport tarfile\nimport tempfile\nfrom pathlib "
},
{
"path": "src/pdm/cli/commands/cache.py",
"chars": 6074,
"preview": "import argparse\nimport os\nfrom pathlib import Path\nfrom typing import Iterable\n\nfrom pdm import termui\nfrom pdm.cli.comm"
},
{
"path": "src/pdm/cli/commands/completion.py",
"chars": 1260,
"preview": "from __future__ import annotations\n\nimport argparse\nimport sys\n\nfrom pdm.cli.commands.base import BaseCommand\nfrom pdm.c"
},
{
"path": "src/pdm/cli/commands/config.py",
"chars": 7699,
"preview": "import argparse\nimport os\nfrom pathlib import Path\nfrom typing import Any, Mapping\n\nfrom pdm import termui\nfrom pdm._typ"
},
{
"path": "src/pdm/cli/commands/export.py",
"chars": 5351,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom pathlib import Path\nfrom typing import Iterable\n\nimport tomlkit"
},
{
"path": "src/pdm/cli/commands/fix/__init__.py",
"chars": 3197,
"preview": "from __future__ import annotations\n\nimport argparse\n\nfrom pdm.cli.commands.base import BaseCommand\nfrom pdm.cli.commands"
},
{
"path": "src/pdm/cli/commands/fix/fixers.py",
"chars": 4611,
"preview": "import abc\nimport re\n\nfrom pdm.project import Config, Project\nfrom pdm.project.lockfile import FLAG_CROSS_PLATFORM\nfrom "
},
{
"path": "src/pdm/cli/commands/import_cmd.py",
"chars": 4328,
"preview": "from __future__ import annotations\n\nimport argparse\n\nfrom pdm.cli.commands.base import BaseCommand\nfrom pdm.exceptions i"
},
{
"path": "src/pdm/cli/commands/info.py",
"chars": 3444,
"preview": "import argparse\nimport json\n\nfrom rich import print_json\n\nfrom pdm.cli.commands.base import BaseCommand\nfrom pdm.cli.opt"
},
{
"path": "src/pdm/cli/commands/init.py",
"chars": 12342,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom typing import TYPE_CHECKING, Any, cast\n\nfrom pdm import termui\n"
},
{
"path": "src/pdm/cli/commands/install.py",
"chars": 4087,
"preview": "import argparse\nimport sys\nimport sysconfig\n\nfrom pdm import termui\nfrom pdm.cli import actions\nfrom pdm.cli.commands.ba"
},
{
"path": "src/pdm/cli/commands/list.py",
"chars": 17028,
"preview": "from __future__ import annotations\n\nimport argparse\nimport csv\nimport io\nimport json\nfrom collections import defaultdict"
},
{
"path": "src/pdm/cli/commands/lock.py",
"chars": 4867,
"preview": "import argparse\nimport re\nimport sys\nfrom typing import cast\n\nfrom pdm import termui\nfrom pdm.cli import actions\nfrom pd"
},
{
"path": "src/pdm/cli/commands/new.py",
"chars": 811,
"preview": "import argparse\nimport os\n\nfrom pdm.cli.commands.base import verbose_option\nfrom pdm.cli.commands.init import Command as"
},
{
"path": "src/pdm/cli/commands/outdated.py",
"chars": 5705,
"preview": "from __future__ import annotations\n\nimport functools\nimport json\nfrom concurrent.futures import ThreadPoolExecutor\nfrom "
},
{
"path": "src/pdm/cli/commands/publish/__init__.py",
"chars": 8265,
"preview": "from __future__ import annotations\n\nimport argparse\nimport os\nfrom typing import TYPE_CHECKING\n\nfrom pdm.cli.commands im"
},
{
"path": "src/pdm/cli/commands/publish/package.py",
"chars": 8267,
"preview": "from __future__ import annotations\n\nimport email\nimport email.message\nimport email.policy\nimport hashlib\nimport io\nimpor"
},
{
"path": "src/pdm/cli/commands/publish/repository.py",
"chars": 6965,
"preview": "from __future__ import annotations\n\nimport os\nfrom typing import TYPE_CHECKING, Any, Iterable, cast\nfrom urllib.parse im"
},
{
"path": "src/pdm/cli/commands/python.py",
"chars": 11111,
"preview": "from __future__ import annotations\n\nimport os\nimport shutil\nimport sys\nimport tempfile\nfrom argparse import ArgumentPars"
},
{
"path": "src/pdm/cli/commands/remove.py",
"chars": 4850,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom typing import TYPE_CHECKING\n\nfrom pdm.cli.commands.base import "
},
{
"path": "src/pdm/cli/commands/run.py",
"chars": 21980,
"preview": "from __future__ import annotations\n\nimport argparse\nimport contextlib\nimport itertools\nimport os\nimport re\nimport shlex\n"
},
{
"path": "src/pdm/cli/commands/search.py",
"chars": 1989,
"preview": "from __future__ import annotations\n\nimport argparse\nimport textwrap\n\nfrom pdm import termui\nfrom pdm._types import Searc"
},
{
"path": "src/pdm/cli/commands/self_cmd.py",
"chars": 10036,
"preview": "from __future__ import annotations\n\nimport argparse\nimport shlex\nimport subprocess\nimport sys\nfrom typing import Any\n\nfr"
},
{
"path": "src/pdm/cli/commands/show.py",
"chars": 2905,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom typing import TYPE_CHECKING\n\nfrom pdm.cli.commands.base import "
},
{
"path": "src/pdm/cli/commands/sync.py",
"chars": 1548,
"preview": "import argparse\n\nfrom pdm.cli import actions\nfrom pdm.cli.commands.base import BaseCommand\nfrom pdm.cli.filters import G"
},
{
"path": "src/pdm/cli/commands/update.py",
"chars": 8416,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom collections import defaultdict\nfrom typing import TYPE_CHECKING"
},
{
"path": "src/pdm/cli/commands/use.py",
"chars": 9278,
"preview": "from __future__ import annotations\n\nimport argparse\n\nfrom pdm import termui\nfrom pdm.cli.commands.base import BaseComman"
},
{
"path": "src/pdm/cli/commands/venv/__init__.py",
"chars": 1794,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom pdm.cli.commands.base import BaseCommand\nfrom"
},
{
"path": "src/pdm/cli/commands/venv/activate.py",
"chars": 2906,
"preview": "from __future__ import annotations\n\nimport platform\nimport shlex\nfrom pathlib import Path\nfrom typing import TYPE_CHECKI"
},
{
"path": "src/pdm/cli/commands/venv/backends.py",
"chars": 7761,
"preview": "from __future__ import annotations\n\nimport abc\nimport os\nimport shutil\nimport subprocess\nimport sys\nfrom functools impor"
},
{
"path": "src/pdm/cli/commands/venv/create.py",
"chars": 2282,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom typing import TYPE_CHECKING\n\nfrom pdm.cli.commands.base import "
},
{
"path": "src/pdm/cli/commands/venv/list.py",
"chars": 925,
"preview": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom pdm.cli.commands.bas"
},
{
"path": "src/pdm/cli/commands/venv/purge.py",
"chars": 2483,
"preview": "from __future__ import annotations\n\nimport shutil\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom pdm im"
},
{
"path": "src/pdm/cli/commands/venv/remove.py",
"chars": 1390,
"preview": "from __future__ import annotations\n\nimport shutil\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom pdm im"
},
{
"path": "src/pdm/cli/commands/venv/utils.py",
"chars": 2860,
"preview": "from __future__ import annotations\n\nimport base64\nimport hashlib\nfrom pathlib import Path\nfrom typing import TYPE_CHECKI"
},
{
"path": "src/pdm/cli/completions/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/cli/completions/pdm.bash",
"chars": 6532,
"preview": "# BASH completion script for pdm\n# Generated by pycomplete 0.4.0\n\n_pdm_a919b69078acdf0a_complete()\n{\n local cur scrip"
},
{
"path": "src/pdm/cli/completions/pdm.fish",
"chars": 76077,
"preview": "# FISH completion script for pdm\n# Generated by pycomplete 0.4.0\n\nfunction __fish_pdm_a919b69078acdf0a_complete_no_subco"
},
{
"path": "src/pdm/cli/completions/pdm.ps1",
"chars": 21463,
"preview": "# Powershell completion script for pdm\n\nif ((Test-Path Function:\\TabExpansion) -and -not (Test-Path Function:\\_pdm_compl"
},
{
"path": "src/pdm/cli/completions/pdm.zsh",
"chars": 33083,
"preview": "#compdef pdm\n\nPDM_PYTHON=\"%{python_executable}\"\n\n_pdm() {\n emulate -L zsh -o extended_glob\n\n typeset -A opt_args\n loc"
},
{
"path": "src/pdm/cli/filters.py",
"chars": 4555,
"preview": "from __future__ import annotations\n\nimport argparse\nfrom functools import cached_property\nfrom typing import TYPE_CHECKI"
},
{
"path": "src/pdm/cli/hooks.py",
"chars": 1469,
"preview": "from __future__ import annotations\n\nimport contextlib\nfrom typing import Any, Generator\n\nfrom pdm.project.core import Pr"
},
{
"path": "src/pdm/cli/options.py",
"chars": 15494,
"preview": "from __future__ import annotations\n\nimport argparse\nimport os\nimport sys\nfrom functools import partial\nfrom typing impor"
},
{
"path": "src/pdm/cli/templates/__init__.py",
"chars": 6896,
"preview": "from __future__ import annotations\n\nimport importlib.resources\nimport os\nimport re\nimport shutil\nimport subprocess\nimpor"
},
{
"path": "src/pdm/cli/templates/default/.gitignore",
"chars": 4560,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[codz]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packag"
},
{
"path": "src/pdm/cli/templates/default/README.md",
"chars": 18,
"preview": "# example-package\n"
},
{
"path": "src/pdm/cli/templates/default/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/cli/templates/default/pyproject.toml",
"chars": 278,
"preview": "[project]\nname = \"example-package\"\nversion = \"0.1.0\"\ndescription = \"Default template for PDM package\"\nauthors = []\ndepen"
},
{
"path": "src/pdm/cli/templates/default/src/example_package/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/cli/templates/default/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/cli/templates/minimal/.gitignore",
"chars": 77,
"preview": "*.py[codz]\n__pycache__/\n.mypy_cache/\n.pytest_cache/\n.ruff_cache/\n.pdm-python\n"
},
{
"path": "src/pdm/cli/templates/minimal/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/cli/templates/minimal/pyproject.toml",
"chars": 278,
"preview": "[project]\nname = \"example-package\"\nversion = \"0.1.0\"\ndescription = \"Default template for PDM package\"\nauthors = []\ndepen"
},
{
"path": "src/pdm/cli/utils.py",
"chars": 27926,
"preview": "from __future__ import annotations\n\nimport argparse\nimport dataclasses as dc\nimport json\nimport os\nimport re\nimport sys\n"
},
{
"path": "src/pdm/compat.py",
"chars": 3418,
"preview": "from __future__ import annotations\n\nimport importlib.resources\nimport sys\nfrom collections.abc import Iterator\nfrom path"
},
{
"path": "src/pdm/core.py",
"chars": 14658,
"preview": "r\"\"\"\n ____ ____ __ ___\n / __ \\/ __ \\/ |/ /\n / /_/ / / / / /|_/ /\n / ____/ /_/ / / / /\n/_/ /_____/_/ /_/\n\""
},
{
"path": "src/pdm/environments/__init__.py",
"chars": 295,
"preview": "from pdm.environments.base import BareEnvironment, BaseEnvironment\nfrom pdm.environments.local import PythonLocalEnviron"
},
{
"path": "src/pdm/environments/base.py",
"chars": 10846,
"preview": "from __future__ import annotations\n\nimport abc\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport tem"
},
{
"path": "src/pdm/environments/local.py",
"chars": 4494,
"preview": "from __future__ import annotations\n\nimport os\nimport re\nimport shlex\nfrom functools import cached_property\nfrom pathlib "
},
{
"path": "src/pdm/environments/python.py",
"chars": 2365,
"preview": "from __future__ import annotations\n\nimport os\nfrom typing import TYPE_CHECKING\n\nfrom pdm.environments.base import BaseEn"
},
{
"path": "src/pdm/exceptions.py",
"chars": 1646,
"preview": "from __future__ import annotations\n\nimport warnings\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n from pdm.mod"
},
{
"path": "src/pdm/formats/__init__.py",
"chars": 1232,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, cast\n\nfrom pdm.formats import flit, pipfile, poetr"
},
{
"path": "src/pdm/formats/base.py",
"chars": 3402,
"preview": "from __future__ import annotations\n\nfrom typing import Any, Callable, Mapping, TypeVar, cast\n\nimport tomlkit\n\nfrom pdm i"
},
{
"path": "src/pdm/formats/flit.py",
"chars": 5824,
"preview": "from __future__ import annotations\n\nimport ast\nimport os\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any,"
},
{
"path": "src/pdm/formats/pipfile.py",
"chars": 2710,
"preview": "from __future__ import annotations\n\nimport functools\nimport operator\nimport os\nfrom typing import TYPE_CHECKING, Any\n\nfr"
},
{
"path": "src/pdm/formats/poetry.py",
"chars": 9042,
"preview": "from __future__ import annotations\n\nimport functools\nimport operator\nimport os\nimport re\nfrom pathlib import Path\nfrom t"
},
{
"path": "src/pdm/formats/pylock.py",
"chars": 7187,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Iterable\n\nimport tomlkit\nfrom dep_logic.marke"
},
{
"path": "src/pdm/formats/requirements.py",
"chars": 9547,
"preview": "from __future__ import annotations\n\nimport argparse\nimport hashlib\nimport shlex\nimport urllib.parse\nfrom pathlib import "
},
{
"path": "src/pdm/formats/setup_py.py",
"chars": 2454,
"preview": "from __future__ import annotations\n\nimport os\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Mapping\n\nf"
},
{
"path": "src/pdm/formats/uv.py",
"chars": 10382,
"preview": "from __future__ import annotations\n\nimport tempfile\nfrom collections.abc import Iterator\nfrom contextlib import ExitStac"
},
{
"path": "src/pdm/installers/__init__.py",
"chars": 282,
"preview": "from pdm.installers.base import BaseSynchronizer\nfrom pdm.installers.manager import InstallManager\nfrom pdm.installers.s"
},
{
"path": "src/pdm/installers/base.py",
"chars": 10510,
"preview": "from __future__ import annotations\n\nimport dataclasses\nimport json\nfrom functools import cached_property\nfrom itertools "
},
{
"path": "src/pdm/installers/core.py",
"chars": 1464,
"preview": "from __future__ import annotations\n\nfrom typing import Iterable\n\nfrom pdm.environments import BaseEnvironment\nfrom pdm.m"
},
{
"path": "src/pdm/installers/installers.py",
"chars": 7707,
"preview": "from __future__ import annotations\n\nimport json\nimport os\nimport stat\nfrom functools import cached_property\nfrom pathlib"
},
{
"path": "src/pdm/installers/manager.py",
"chars": 3079,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom pdm import termui\nfrom pdm.compat import Dist"
},
{
"path": "src/pdm/installers/synchronizers.py",
"chars": 10805,
"preview": "from __future__ import annotations\n\nimport functools\nimport traceback\nfrom concurrent.futures import Future, ThreadPoolE"
},
{
"path": "src/pdm/installers/uninstallers.py",
"chars": 12153,
"preview": "from __future__ import annotations\n\nimport abc\nimport glob\nimport os\nimport shutil\nfrom pathlib import Path\nfrom tempfil"
},
{
"path": "src/pdm/installers/uv.py",
"chars": 3965,
"preview": "from __future__ import annotations\n\nimport os\nimport subprocess\nfrom typing import Any\n\nfrom pdm._types import HiddenTex"
},
{
"path": "src/pdm/misc/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/misc/sysconfig_patcher.py",
"chars": 9594,
"preview": "# Copyright 2024 Ulrik Sverdrup \"bluss\"\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy"
},
{
"path": "src/pdm/models/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/models/auth.py",
"chars": 4895,
"preview": "from __future__ import annotations\n\nimport functools\nimport urllib.parse\n\nfrom unearth.auth import MaybeAuth, MultiDomai"
},
{
"path": "src/pdm/models/backends.py",
"chars": 4607,
"preview": "from __future__ import annotations\n\nimport abc\nimport os\nimport urllib.parse\nfrom pathlib import Path\nfrom typing import"
},
{
"path": "src/pdm/models/cached_package.py",
"chars": 3023,
"preview": "from __future__ import annotations\n\nimport os\nimport shutil\nfrom functools import cached_property\nfrom pathlib import Pa"
},
{
"path": "src/pdm/models/caches.py",
"chars": 11859,
"preview": "from __future__ import annotations\n\nimport contextlib\nimport hashlib\nimport json\nimport os\nimport stat\nfrom functools im"
},
{
"path": "src/pdm/models/candidates.py",
"chars": 29166,
"preview": "from __future__ import annotations\n\nimport dataclasses\nimport hashlib\nimport os\nimport re\nimport warnings\nfrom functools"
},
{
"path": "src/pdm/models/finder.py",
"chars": 3976,
"preview": "from __future__ import annotations\n\nimport logging\nfrom typing import TYPE_CHECKING, Any, Callable\n\nimport unearth\nfrom "
},
{
"path": "src/pdm/models/in_process/__init__.py",
"chars": 1975,
"preview": "\"\"\"\nA collection of functions that need to be called via a subprocess call.\n\"\"\"\n\nfrom __future__ import annotations\n\nimp"
},
{
"path": "src/pdm/models/in_process/env_spec.py",
"chars": 704,
"preview": "from __future__ import annotations\n\nimport json\nimport platform\nimport site\nimport sys\nimport sysconfig\n\n\ndef get_curren"
},
{
"path": "src/pdm/models/in_process/parse_setup.py",
"chars": 6641,
"preview": "from __future__ import annotations\n\nimport os\nimport sys\nfrom typing import Any\n\n\ndef _parse_setup_cfg(path: str) -> dic"
},
{
"path": "src/pdm/models/in_process/sysconfig_get_paths.py",
"chars": 1698,
"preview": "import json\nimport os\nimport sys\nimport sysconfig\n\n\ndef _running_under_venv():\n \"\"\"This handles PEP 405 compliant vir"
},
{
"path": "src/pdm/models/markers.py",
"chars": 8477,
"preview": "from __future__ import annotations\n\nimport operator\nfrom dataclasses import dataclass, replace\nfrom functools import lru"
},
{
"path": "src/pdm/models/project_info.py",
"chars": 3523,
"preview": "from __future__ import annotations\n\nimport itertools\nfrom dataclasses import dataclass, field\nfrom email.message import "
},
{
"path": "src/pdm/models/python.py",
"chars": 2388,
"preview": "from __future__ import annotations\n\nimport os\nfrom functools import cached_property\nfrom pathlib import Path\nfrom typing"
},
{
"path": "src/pdm/models/python_max_versions.json",
"chars": 366,
"preview": "{\n \"2\": 7,\n \"2.0\": 1,\n \"2.1\": 3,\n \"2.2\": 3,\n \"2.3\": 7,\n \"2.4\": 6,\n \"2.5\": 6,\n \"2.6\": 9,\n \"2.7"
},
{
"path": "src/pdm/models/reporter.py",
"chars": 3617,
"preview": "from __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom pathlib import Path\nfrom typing import TYPE_C"
},
{
"path": "src/pdm/models/repositories/__init__.py",
"chars": 366,
"preview": "from pdm.models.repositories.base import BaseRepository as BaseRepository\nfrom pdm.models.repositories.base import Candi"
},
{
"path": "src/pdm/models/repositories/base.py",
"chars": 15086,
"preview": "from __future__ import annotations\n\nimport fnmatch\nimport re\nimport sys\nimport warnings\nfrom functools import wraps\nfrom"
},
{
"path": "src/pdm/models/repositories/lock.py",
"chars": 14358,
"preview": "from __future__ import annotations\n\nimport dataclasses\nimport itertools\nimport posixpath\nfrom functools import cached_pr"
},
{
"path": "src/pdm/models/repositories/pypi.py",
"chars": 4156,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, cast\n\nfrom pdm.exceptions import CandidateInfoNotF"
},
{
"path": "src/pdm/models/requirements.py",
"chars": 20114,
"preview": "from __future__ import annotations\n\nimport dataclasses\nimport functools\nimport inspect\nimport json\nimport os\nimport posi"
},
{
"path": "src/pdm/models/search.py",
"chars": 2305,
"preview": "from __future__ import annotations\n\nimport functools\nfrom dataclasses import dataclass\nfrom html.parser import HTMLParse"
},
{
"path": "src/pdm/models/session.py",
"chars": 6866,
"preview": "from __future__ import annotations\n\nimport os\nimport sqlite3\nimport sys\nimport threading\nfrom contextlib import closing\n"
},
{
"path": "src/pdm/models/setup.py",
"chars": 15306,
"preview": "from __future__ import annotations\n\nimport ast\nimport os\nfrom configparser import ConfigParser\nfrom dataclasses import a"
},
{
"path": "src/pdm/models/specifiers.py",
"chars": 9836,
"preview": "from __future__ import annotations\n\nimport dataclasses\nimport itertools\nimport json\nimport re\nimport warnings\nfrom funct"
},
{
"path": "src/pdm/models/venv.py",
"chars": 2642,
"preview": "from __future__ import annotations\n\nimport dataclasses as dc\nimport sys\nfrom functools import cached_property\nfrom pathl"
},
{
"path": "src/pdm/models/versions.py",
"chars": 5908,
"preview": "from __future__ import annotations\n\nimport re\nfrom typing import TYPE_CHECKING, overload\n\nfrom pdm.exceptions import Inv"
},
{
"path": "src/pdm/models/working_set.py",
"chars": 3367,
"preview": "from __future__ import annotations\n\nimport itertools\nimport sys\nfrom collections import ChainMap\nfrom pathlib import Pat"
},
{
"path": "src/pdm/pep582/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/pep582/sitecustomize.py",
"chars": 4373,
"preview": "import os\nimport site\nimport sys\nfrom pathlib import Path\n\n\ndef get_pypackages_path():\n def find_pypackage(path, vers"
},
{
"path": "src/pdm/project/__init__.py",
"chars": 134,
"preview": "from pdm.project.config import Config, ConfigItem\nfrom pdm.project.core import Project\n\n__all__ = [\"Config\", \"ConfigItem"
},
{
"path": "src/pdm/project/config.py",
"chars": 19575,
"preview": "from __future__ import annotations\n\nimport collections\nimport dataclasses\nimport os\nfrom functools import cached_propert"
},
{
"path": "src/pdm/project/core.py",
"chars": 45369,
"preview": "from __future__ import annotations\n\nimport contextlib\nimport hashlib\nimport itertools\nimport operator\nimport os\nimport r"
},
{
"path": "src/pdm/project/lockfile/__init__.py",
"chars": 1477,
"preview": "from __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom pdm.proje"
},
{
"path": "src/pdm/project/lockfile/base.py",
"chars": 4190,
"preview": "from __future__ import annotations\n\nimport abc\nimport enum\nfrom functools import cached_property\nfrom typing import TYPE"
},
{
"path": "src/pdm/project/lockfile/pdmlock.py",
"chars": 5230,
"preview": "from __future__ import annotations\n\nfrom functools import cached_property\nfrom typing import TYPE_CHECKING, Iterable\n\nim"
},
{
"path": "src/pdm/project/lockfile/pylock.py",
"chars": 2133,
"preview": "from __future__ import annotations\n\nfrom functools import cached_property\nfrom typing import Iterable\n\nfrom pdm.exceptio"
},
{
"path": "src/pdm/project/project_file.py",
"chars": 4809,
"preview": "from __future__ import annotations\n\nimport hashlib\nimport json\nfrom typing import Any, cast\n\nimport tomlkit\n\nfrom pdm im"
},
{
"path": "src/pdm/project/toml_file.py",
"chars": 2330,
"preview": "from __future__ import annotations\n\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom typing import Any, cast\n\nimp"
},
{
"path": "src/pdm/py.typed",
"chars": 0,
"preview": ""
},
{
"path": "src/pdm/pytest.py",
"chars": 21330,
"preview": "\"\"\"\nSome reusable fixtures for `pytest`.\n\n+++ 2.4.0\n\nTo enable them in your test, add `pdm.pytest` as a plugin.\nYou can "
},
{
"path": "src/pdm/resolver/__init__.py",
"chars": 141,
"preview": "from .base import Resolver\nfrom .resolvelib import RLResolver\nfrom .uv import UvResolver\n\n__all__ = [\"RLResolver\", \"Reso"
},
{
"path": "src/pdm/resolver/base.py",
"chars": 2154,
"preview": "from __future__ import annotations\n\nimport abc\nimport typing as t\nfrom dataclasses import dataclass, field\n\nfrom resolve"
},
{
"path": "src/pdm/resolver/graph.py",
"chars": 4701,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, AbstractSet, Iterable, Iterator, TypeVar, overload"
},
{
"path": "src/pdm/resolver/providers.py",
"chars": 22456,
"preview": "from __future__ import annotations\n\nimport dataclasses\nimport os\nfrom functools import cached_property\nfrom typing impor"
},
{
"path": "src/pdm/resolver/python.py",
"chars": 1578,
"preview": "\"\"\"\nSpecial requirement and candidate classes to describe a requires-python constraint\n\"\"\"\n\nfrom __future__ import annot"
},
{
"path": "src/pdm/resolver/reporters.py",
"chars": 6041,
"preview": "from __future__ import annotations\n\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING, Any, Generat"
},
{
"path": "src/pdm/resolver/resolvelib.py",
"chars": 5863,
"preview": "from __future__ import annotations\n\nimport inspect\nimport os\nfrom dataclasses import dataclass, replace\nfrom pathlib imp"
},
{
"path": "src/pdm/resolver/uv.py",
"chars": 9737,
"preview": "from __future__ import annotations\n\nimport logging\nimport os\nimport re\nimport subprocess\nfrom dataclasses import datacla"
},
{
"path": "src/pdm/signals.py",
"chars": 4012,
"preview": "\"\"\"\nThe signal definition for PDM.\n\nExample:\n ```python\n from pdm.signals import post_init, post_install\n\n def "
},
{
"path": "src/pdm/termui.py",
"chars": 11034,
"preview": "from __future__ import annotations\n\nimport contextlib\nimport enum\nimport logging\nimport os\nimport tempfile\nimport warnin"
},
{
"path": "src/pdm/utils.py",
"chars": 19424,
"preview": "\"\"\"\nUtility functions\n\"\"\"\n\nfrom __future__ import annotations\n\nimport atexit\nimport contextlib\nimport functools\nimport i"
}
]
// ... and 173 more files (download for full content)
About this extraction
This page contains the full source code of the pdm-project/pdm GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 373 files (1.8 MB), approximately 469.0k tokens, and a symbol index with 2279 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.