1. 28 Aug, 2022 2 commits
    • Misc cleanups (#6256) · 3ff5a39b
      No functional change or fixes here, just tidier code:
      * prefer Path.exists()
      * typechecking - NormalizedNames from poetry-core
      * clean up some unnecessary duplication
      * minor refactor
      * gather the pyproject.toml parsing into one block, save a level of indentation
      * remove more dead code
      * simplify handling of extras at command line
      * more abstract types 
      David Hotham committed
    • doc(configuration): improve documentation (#6254) · 73e4bde8
      # Pull Request Check List
      
      - [ ] Added **tests** for changed code.
      - [ ] Updated **documentation** for changed code.
      
      Bunch of improvements over `Configuration` documentation:
      - Better show default value of options
      - Add some missing `Introduced in <VERSION>` notes
      - Add backticks around types for better readability
      
      Will backport to `1.2` branch before final release.
      Mathieu Kniewallner committed
  2. 27 Aug, 2022 3 commits
  3. 26 Aug, 2022 2 commits
  4. 25 Aug, 2022 3 commits
  5. 24 Aug, 2022 3 commits
    • refactor: replace cleo's removed `Terminal` class (#6224) · bd32b9ea
      `cleo.terminal.Terminal` was replaced in https://github.com/python-poetry/cleo/pull/175 in favor of `shutil.get_terminal_size`
      Branch Vincent committed
    • fix: skip configure env for SelfCommand (#6225) · a4903861
      At the moment a venv is created on running a `poetry self` command. Even if it is not used in the command itself it's unnecessary and lead to problems as reported in #6222. This PR fixes this.
      
      Resolves: #6222
      finswimmer committed
    • Executor: Remove duplicate entry with dry-run argument (#4660) · 75cf77bb
      # Pull Request Check List
      
      Resolves: #3097 
      
      <!-- This is just a reminder about the most common mistakes. Please make sure that you tick all *appropriate* boxes.  But please read our [contribution guide](https://python-poetry.org/docs/contributing/) at least once, it will save you unnecessary review cycles! -->
      
      - [x] Added **tests** for changed code. I adapted the test in the `tests/console/commands/plugin/test_remove.py` file to reflect the bug fix.
      - [ ] Updated **documentation** for changed code.
      
      <!-- If you have *any* questions to *any* of the points above, just **submit and ask**!  This checklist is here to *help* you, not to deter you from contributing! -->
      
      Apart from running the ci linting steps and pytest locally for both python 3.6 and 3.8, I also tested the code by running
      ```
      docker run --rm -i --entrypoint bash python:3.8 <<EOF
      set -e
      python -m pip install -q git+https://github.com/mmacchia/poetry.git@issue/3097
      python -m poetry new foobar
      pushd foobar
      sed -i /pytest/d pyproject.toml
      python -m poetry add --dry-run pycowsay
      python -m poetry run pip list
      EOF
      ```
      The corresponding output is:
      ```
      Created package foobar in foobar
      /foobar /
      Creating virtualenv foobar-lWDpn5M1-py3.8 in /root/.cache/pypoetry/virtualenvs
      Using version ^0.0.0.1 for pycowsay
      
      Updating dependencies
      Resolving dependencies...
      
      Writing lock file
      
      Package operations: 1 install, 0 updates, 0 removals
      
        • Installing pycowsay (0.0.0.1)
      Package    Version
      ---------- -------
      pip        21.2.4
      setuptools 58.1.0
      wheel      0.37.0
      ```
      As expected, the command `poetry add --dry-run pycowsay` yielded a single output (` • Installing pycowsay (0.0.0.1)`) and did not add the package to the project (see the output of `poetry run pip list`).
      
      The change in the PR solves the duplication issue because the creation of the console output when `not self._enabled` is taken care of by the boolean output of the`self._should_write_operation(operation)` function.
      
      Please feel free to get in touch if I can help adding more test cases for the `--dry-run` argument or the `_enabled` flag and to add any feedback. I would be happy to improve/clarify the code in this PR.
      
      Co-authored-by: Marco Macchia <mmacchia@wayfair.com>
      mmacchia committed
  6. 23 Aug, 2022 5 commits
  7. 22 Aug, 2022 6 commits
  8. 21 Aug, 2022 7 commits
  9. 20 Aug, 2022 3 commits
  10. 19 Aug, 2022 2 commits
  11. 18 Aug, 2022 1 commit
  12. 17 Aug, 2022 1 commit
  13. 16 Aug, 2022 1 commit
  14. 15 Aug, 2022 1 commit