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

Support poetry.lock #835

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Support poetry.lock #835

wants to merge 10 commits into from

Commits on Nov 24, 2019

  1. Configuration menu
    Copy the full SHA
    3ebeb57 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d20ddf8 View commit details
    Browse the repository at this point in the history
  3. Add tests for pyproject.toml-style projects using poetry

    Add two test cases for projects using poetry as the build backend:
    
    - testPoetry: project without dependencies
    
    - testPoetryLock: project with dependencies, using a poetry.lock file
    cjolowicz committed Nov 24, 2019
    Configuration menu
    Copy the full SHA
    0422f56 View commit details
    Browse the repository at this point in the history
  4. Add tests for pyproject.toml-style projects using flit

    Add two test cases for projects using flit as the build backend:
    
    - testFlit: project without dependencies
    
    - testFlitRequires: project with dependencies
    cjolowicz committed Nov 24, 2019
    Configuration menu
    Copy the full SHA
    7a65ab1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    42c45ee View commit details
    Browse the repository at this point in the history
  6. Add failing test for poetry.lock

    Check that pinned requirements are honored when poetry.lock is present.
    Request an outdated version of marshmallow in poetry.lock (3.0.0). Check
    that the outdated version is installed, rather than a newer version
    also satisfying the version constraint in pyproject.toml (^3.0.0).
    cjolowicz committed Nov 24, 2019
    Configuration menu
    Copy the full SHA
    13633db View commit details
    Browse the repository at this point in the history
  7. Do not write requirements.txt for pyproject.toml-based projects

    Install pyproject.toml-based projects using `pip install .`. Do not use a
    requirements.txt for this. The requirements.txt file is needed to handle pinned
    versions extracted from the poetry.lock file.
    
    Note that we cannot simply append `.` to the exported requirements.txt file.
    Currently pip requires that either all requirements have a hash or none.
    Including `.` would thus force us to omit hashes for all requirements.
    cjolowicz committed Nov 24, 2019
    Configuration menu
    Copy the full SHA
    4c9b95c View commit details
    Browse the repository at this point in the history
  8. Install pinned dependencies from poetry.lock

    If a poetry.lock file is present, use the Poetry CLI to export the
    pinned requirements to a requirements.txt file. If the project already
    contains a requirements.txt, use that and ignore poetry.lock.
    
    Poetry is not used to install the project because it does not clean up
    stale requirements. This means that requirements need to be exported
    anyway, for the `pip-uninstall` step.
    
    Since we only use Poetry to export a requirements.txt file, ignore the
    Poetry version specified in pyproject.toml. Install a pre-release of
    1.0.0 because the export command is not available before 1.0.0a0.
    
    Note that supporting pyproject.toml-based installations is not enough to
    handle pinned requirements: When pip installs a pyproject.toml-style
    project using the process described in PEP 517, it only uses Poetry to
    build a wheel. The wheel contains the version constraints from
    pyproject.toml, not the pinned versions from poetry.lock.
    cjolowicz committed Nov 24, 2019
    Configuration menu
    Copy the full SHA
    2614fab View commit details
    Browse the repository at this point in the history
  9. Upgrade to poetry 1.0.0b7

    cjolowicz committed Nov 24, 2019
    Configuration menu
    Copy the full SHA
    1d609a1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    cd23a90 View commit details
    Browse the repository at this point in the history