python-poetry / python-poetry/poetry

(🎁) Support `{project-dir}` in `certificate` config values

Open
#8,313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • [πŸš€] I have searched the issues of this repo and believe that this is not a duplicate.
  • [πŸš€] I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

poetry.toml:

repositories.nexus.url = "https://nexus.url.com/repository/pypi/simple/"
certificates.nexus.cert = "cacert.pem"  # works, but only when wd is project root
# certificates.nexus.cert = "{project-dir}/cacert.pem"  # doesn't work :(
πŸ‘‰ cd src
πŸ‘‰ poetry install
Installing dependencies from lock file

Package operations: 1 install, 0 updates, 0 removals

  β€’ Installing AMONGUS (1.2.3): Failed

  OSError

  Could not find a suitable TLS CA certificate bundle, invalid path: cacert.pem

  at ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\requests\adapters.py:261 in cert_verify
      257β”‚             if not cert_loc:
      258β”‚                 cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
      259β”‚
      260β”‚             if not cert_loc or not os.path.exists(cert_loc):
    β†’ 261β”‚                 raise OSError(
      262β”‚                     f"Could not find a suitable TLS CA certificate bundle, "
      263β”‚                     f"invalid path: {cert_loc}"
      264β”‚                 )
      265β”‚

With "{project-dir}/cacert.pem":

Could not find a suitable TLS CA certificate bundle, invalid path: {project-dir}\cacert.pem

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up β€” it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the poetry.toml certificate configuration and reproduce the failure by running poetry install from src with a relative cacert.pem path. Trace how the certificate value is passed to the installer, then verify that {project-dir}/cacert.pem resolves to the project directory and allows installation to complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.