Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(manager/poetry): add support for explicit sources #26337

Merged
merged 1 commit into from Dec 17, 2023

Conversation

Churro
Copy link
Collaborator

@Churro Churro commented Dec 16, 2023

Changes

  • Extends parsing of Poetry package sources by name and priority
    • Extracted registry URLs are ordered in the way poetry visits them (see docs)
  • Adds support for packages with explicit sources.

Newly added tests cover the same scenarios that are also covered by poetry-internal tests (see here).

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Test repo: renovate-demo/12003-poetry-source#2

Logs with only https://christopherfrieler.github.io/renovate-issue-12003/ in registryUrls but no PyPI
DEBUG: packageFiles with updates (repository=renovate-demo/12003-poetry-source, baseBranch=master)
"config": {
  "poetry": [
   {
     "deps": [
       {
         "datasource": "pypi",
         "managerData": {
           "nestedVersion": true,
           "sourceName": "my-package-index"
         },
         "currentValue": "1.0.0",
         "versioning": "pep440",
         "depName": "some_dependency",
         "packageName": "some-dependency",
         "depType": "dependencies",
         "registryUrls": [
           "https://christopherfrieler.github.io/renovate-issue-12003/"
         ],
         "lockedVersion": "1.0.0",
         "updates": [
           {
             "bucket": "non-major",
             "newVersion": "1.1.0",
             "newValue": "1.1.0",
             "newMajor": 1,
             "newMinor": 1,
             "updateType": "minor",
             "branchName": "renovate/some_dependency-1.x"
           }
         ],
         "warnings": [],
         "registryUrl": "https://christopherfrieler.github.io/renovate-issue-12003",
         "currentVersion": "1.0.0",
         "isSingleVersion": true,
         "fixedVersion": "1.0.0"
       }
     ],
     "registryUrls": [
       "https://christopherfrieler.github.io/renovate-issue-12003/",
       "https://pypi.org/pypi/"
     ],
     "extractedConstraints": {"python": "~3.8"},
     "lockFiles": ["poetry.lock"],
     "packageFile": "pyproject.toml"
   }
  ]
}

@rarkins rarkins added this pull request to the merge queue Dec 17, 2023
Merged via the queue into renovatebot:main with commit 24f8f0d Dec 17, 2023
36 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.102.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

hersentino pushed a commit to hiventive/renovate that referenced this pull request Jan 9, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explicit source of Poetry managed Python dependency is not supported
3 participants