Skip to content

Commit

Permalink
Merge branch 'develop' into merge-develop-into-master
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/release.yml
#	CHANGELOG.md
#	Makefile
#	make-linux-release.sh
#	poetry.lock
#	poetry/__version__.py
#	poetry/packages/locker.py
#	pyproject.toml
#	tests/packages/test_locker.py
  • Loading branch information
sdispater committed Jul 23, 2020
2 parents 037c5a5 + 32c87c9 commit be09d9c
Show file tree
Hide file tree
Showing 374 changed files with 8,451 additions and 18,425 deletions.
45 changes: 45 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
freebsd_instance:
image_family: freebsd-12-1-snap

test_task:
name: "Tests / FreeBSD / "
env:
matrix:
- PYTHON: python2.7
- PYTHON: python3.5
- PYTHON: python3.6
- PYTHON: python3.7
- PYTHON: python3.8
python_script:
- PYPACKAGE=$(printf '%s' $PYTHON | tr -d '.')
- SQLPACKAGE=$(printf '%s-sqlite3' $PYPACKAGE | sed 's/thon//')
- pkg install -y git-lite $PYPACKAGE $SQLPACKAGE
pip_script:
- $PYTHON -m ensurepip
- $PYTHON -m pip install -U pip tox
- $PYTHON -m pip install -U --pre poetry
- poetry config virtualenvs.in-project true
tox_script: $PYTHON -m tox -e py -- -q --junitxml=junit.xml tests
on_failure:
annotate_failure_artifacts:
path: junit.xml
format: junit
type: text/xml

release_task:
name: "Release / FreeBSD"
only_if: $CIRRUS_TAG != ''
freebsd_instance:
matrix:
- image_family: freebsd-12-1-snap
- image_family: freebsd-11-3-snap
python_script: pkg install -y python3 python27 python35 python36 python37 python38
pip_script:
- python2.7 -m ensurepip
- python3.5 -m ensurepip
- python3.6 -m ensurepip
- python3.7 -m ensurepip
- python3.8 -m ensurepip
build_script: ./make-nix-release.sh
archive_artifacts:
path: "releases/*"
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exclude =
.vscode
.github
poetry/utils/_compat.py
poetry/utils/env_scripts/tags.py
tests/fixtures/
tests/repositories/fixtures/
tests/utils/fixtures/
17 changes: 14 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Tests

on: [push, pull_request]
on:
push:
branches:
- master
- develop
pull_request:
branches:
- '**'

jobs:
Linting:
Expand Down Expand Up @@ -41,7 +48,7 @@ jobs:
- name: Install poetry
shell: bash
run: |
python get-poetry.py -y
python get-poetry.py -y --preview
echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH"
- name: Configure poetry
Expand All @@ -60,10 +67,14 @@ jobs:
shell: bash
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv

- name: Upgrade pip
shell: bash
run: poetry run python -m pip install pip -U

- name: Install dependencies
shell: bash
run: poetry install

- name: Run pytest
shell: bash
run: poetry run pytest -q tests
run: poetry run pytest -v tests
8 changes: 2 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ jobs:
- name: Preparing Python executables
run: |
curl -L https://github.com/sdispater/python-binaries/releases/download/2.7.17/python-2.7.17.macos.tar.xz -o python-2.7.17.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.4.10/python-3.4.10.macos.tar.xz -o python-3.4.10.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.5.9/python-3.5.9.macos.tar.xz -o python-3.5.9.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.6.8/python-3.6.8.macos.tar.xz -o python-3.6.8.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.7.6/python-3.7.6.macos.tar.xz -o python-3.7.6.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.8.3/python-3.8.3.macos.tar.xz -o python-3.8.3.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.9.0b4/python-3.9.0b4.macos.tar.xz -o python-3.9.0b4.tar.xz
tar -zxf python-2.7.17.tar.xz
tar -zxf python-3.4.10.tar.xz
tar -zxf python-3.5.9.tar.xz
tar -zxf python-3.6.8.tar.xz
tar -zxf python-3.7.6.tar.xz
Expand All @@ -70,7 +68,7 @@ jobs:
- name: Build specific release
run: |
source $HOME/.poetry/env
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17/bin/python" -P "3.4:python-3.4.10/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.6/bin/python" -P "3.8:python-3.8.3/bin/python" -P "3.9:python-3.9.0b4/bin/python"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.6/bin/python" -P "3.8:python-3.8.3/bin/python" -P "3.9:python-3.9.0b4/bin/python"
- name: Upload release file
uses: actions/upload-artifact@v1
with:
Expand Down Expand Up @@ -107,14 +105,12 @@ jobs:
- name: Preparing Python executables
run: |
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/2.7.17/python-2.7.17.windows.tar.xz -O python-2.7.17.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.4.4/python-3.4.4.windows.tar.xz -O python-3.4.4.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.5.4/python-3.5.4.windows.tar.xz -O python-3.5.4.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.6.8/python-3.6.8.windows.tar.xz -O python-3.6.8.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.7.6/python-3.7.6.windows.tar.xz -O python-3.7.6.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.8.3/python-3.8.3.windows.tar.xz -O python-3.8.3.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.9.0b4/python-3.9.0b4.windows.tar.xz -O python-3.9.0b4.tar.xz
7z x python-2.7.17.tar.xz
7z x python-3.4.4.tar.xz
7z x python-3.5.4.tar.xz
7z x python-3.6.8.tar.xz
7z x python-3.7.6.tar.xz
Expand All @@ -130,7 +126,7 @@ jobs:
- name: Build specific release
run: |
$env:Path += ";$env:Userprofile\.poetry\bin"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.4:python-3.4.4\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.6\python.exe" -P "3.8:python-3.8.3\python.exe" -P "3.9:python-3.9.0b4\python.exe"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.6\python.exe" -P "3.8:python-3.8.3\python.exe" -P "3.9:python-3.9.0b4\python.exe"
- name: Upload release file
uses: actions/upload-artifact@v1
with:
Expand Down
56 changes: 54 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,56 @@
- Fixed errors when installing directory or file dependencies in some cases ([#2582](https://github.com/python-poetry/poetry/pull/2582)).


## [1.1.0a3] - 2020-07-10

### Added

- New installer which provides a faster and better experience ([#2595](https://github.com/python-poetry/poetry/pull/2595)).

### Fixed

- Fixed resolution error when handling duplicate dependencies with environment markers ([#2622](https://github.com/python-poetry/poetry/pull/2622)).
- Fixed erroneous resolution errors when resolving packages to install ([#2625](https://github.com/python-poetry/poetry/pull/2625)).
- Fixed errors when detecting installed editable packages ([#2602](https://github.com/python-poetry/poetry/pull/2602)).


## [1.1.0a2] - 2020-06-26

Note that lock files generated with this release are not compatible with previous releases of Poetry.

### Added

- The `install` command now supports a `--remove-untracked` option to ensure only packages from the lock file are present in the environment ([#2172](https://github.com/python-poetry/poetry/pull/2172)).
- Some errors will now be provided with possible solutions and links to the documentation ([#2396](https://github.com/python-poetry/poetry/pull/2396)).

### Changed

- Editable installations of Poetry projects have been improved and are now faster ([#2360](https://github.com/python-poetry/poetry/pull/2360)).
- Improved the accuracy of the dependency resolver in case of dependencies with environment markers ([#2361](https://github.com/python-poetry/poetry/pull/2361))
- Environment markers of dependencies are no longer stored in the lock file ([#2361](https://github.com/python-poetry/poetry/pull/2361)).
- Improved the way connection errors are handled when publishing ([#2285](https://github.com/python-poetry/poetry/pull/2285)).

### Fixed

- Fixed errors when handling duplicate dependencies with environment markers ([#2342](https://github.com/python-poetry/poetry/pull/2342)).
- Fixed the detection of installed packages ([#2360](https://github.com/python-poetry/poetry/pull/2360)).


## [1.1.0a1] - 2020-03-27

This release **must** be downloaded via the `get-poetry.py` script and not via the `self update` command.

### Added

- Added a new `--dry-run` option to the `publish` command ([#2199](https://github.com/python-poetry/poetry/pull/2199)).

### Changed

- The core features of Poetry have been extracted in to a separate library: `poetry-core` ([#2212](https://github.com/python-poetry/poetry/pull/2212)).
- The build backend is no longer `poetry.masonry.api` but `poetry.core.masonry.api` which requires `poetry-core>=1.0.0a5` ([#2212](https://github.com/python-poetry/poetry/pull/2212)).
- The exceptions are now beautifully displayed in the terminal with various level of details depending on the verbosity ([2230](https://github.com/python-poetry/poetry/pull/2230)).


## [1.0.9] - 2020-06-09

### Fixed
Expand Down Expand Up @@ -86,7 +136,6 @@
- Fixed an error when parsing some git URLs ([#2018](https://github.com/python-poetry/poetry/pull/2018)).



## [1.0.3] - 2020-01-31

### Fixed
Expand Down Expand Up @@ -883,7 +932,10 @@ Initial release



[Unreleased]: https://github.com/python-poetry/poetry/compare/1.0.10...master
[Unreleased]: https://github.com/python-poetry/poetry/compare/1.1.0a3...master
[1.1.0a3]: https://github.com/python-poetry/poetry/releases/tag/1.1.0a3
[1.1.0a2]: https://github.com/python-poetry/poetry/releases/tag/1.1.0a2
[1.1.0a1]: https://github.com/python-poetry/poetry/releases/tag/1.1.0a1
[1.0.10]: https://github.com/python-poetry/poetry/releases/tag/1.0.10
[1.0.9]: https://github.com/python-poetry/poetry/releases/tag/1.0.9
[1.0.8]: https://github.com/python-poetry/poetry/releases/tag/1.0.8
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ linux_release:
-e PYTHON37=/opt/python/cp37-cp37m/bin/python \
-e PYTHON38=/opt/python/cp38-cp38/bin/python \
-e PYTHON39=/opt/python/cp39-cp39/bin/python \
quay.io/pypa/manylinux2010_x86_64 sh -c "cd /io && ./make-linux-release.sh"
quay.io/pypa/manylinux2010_x86_64 sh -c "cd /io && ./make-nix-release.sh"

# run tests against all supported python versions
tox:
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ ensuring you have the right stack everywhere.

![Poetry Install](https://raw.githubusercontent.com/python-poetry/poetry/master/assets/install.gif)

It supports Python 2.7 and 3.4+.
It supports Python 2.7 and 3.5+.

**Note**: Python 2.7 and 3.5 will no longer be supported in the next feature release (1.2).
You should consider updating your Python version to a supported one.

[![Tests Status](https://github.com/python-poetry/poetry/workflows/Tests/badge.svg?branch=master&event=push)](https://github.com/python-poetry/poetry/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)

Expand All @@ -23,6 +26,13 @@ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poet

Alternatively, you can download the `get-poetry.py` file and execute it separately.

The setup script must be able to find one of following executables in your shell's path environment:

- `python` (which can be a py3 or py2 interpreter)
- `python3`
- `py.exe -3` (Windows)
- `py.exe -2` (Windows)

If you want to install prerelease versions, you can do so by passing `--preview` to `get-poetry.py`:

```bash
Expand Down
28 changes: 26 additions & 2 deletions docs/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ poetry init
* `--name`: Name of the package.
* `--description`: Description of the package.
* `--author`: Author of the package.
* `--python` Compatible Python versions.
* `--dependency`: Package to require with a version constraint. Should be in format `foo:1.0.0`.
* `--dev-dependency`: Development requirements, see `--require`.

Expand All @@ -107,6 +108,13 @@ the `--no-dev` option.
poetry install --no-dev
```

If you want to remove old dependencies no longer present in the lock file, use the
`--remove-untracked` option.

```bash
poetry install --remove-untracked
```

You can also specify the extras you want installed
by passing the `--E|--extras` option (See [Extras](#extras) for more info)

Expand Down Expand Up @@ -247,6 +255,7 @@ poetry add "git+https://github.com/pallets/[email protected][dotenv,dev]"
* `--path`: The path to a dependency.
* `--optional` : Add as an optional dependency.
* `--dry-run` : Outputs the operations but will not execute anything (implicitly enables --verbose).
* `--lock` : Do not perform install (only update the lockfile).


## remove
Expand Down Expand Up @@ -327,6 +336,7 @@ It can also build the package if you pass it the `--build` option.
Should match a repository name set by the [`config`](#config) command.
* `--username (-u)`: The username to access the repository.
* `--password (-p)`: The password to access the repository.
* `--dry-run`: Perform all actions except upload the package.

## config

Expand Down Expand Up @@ -438,7 +448,9 @@ The table below illustrates the effect of these rules with concrete examples.
| prerelease | 1.0.3-alpha.0 | 1.0.3-alpha.1 |
| prerelease | 1.0.3-beta.0 | 1.0.3-beta.1 |

## Options

* `--short (-s)`: Output the version number only.

## export

Expand All @@ -454,8 +466,8 @@ poetry export -f requirements.txt > requirements.txt

### Options

* `--format (-f)`: The format to export to. Currently, only
`requirements.txt` is supported.
* `--format (-f)`: The format to export to (default: `requirements.txt`).
Currently, only `requirements.txt` is supported.
* `--output (-o)`: The name of the output file. If omitted, print to standard
output.
* `--dev`: Include development dependencies.
Expand All @@ -469,3 +481,15 @@ The `env` command regroups sub commands to interact with the virtualenvs
associated with a specific project.

See [Managing environments](/docs/managing-environments/) for more information about these commands.

## cache

The `cache` command regroups sub commands to interact with Poetry's cache.

### cache list

The `cache list` command lists Poetry's available caches.

```bash
poetry cache list
```
4 changes: 2 additions & 2 deletions docs/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ So, in your `pyproject.toml` file, add this section if it does not already exist

```toml
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
```

And use a `tox.ini` configuration file similar to this:
Expand Down
7 changes: 6 additions & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ It allows you to declare the libraries your project depends on and it will manag

## System requirements

Poetry requires Python 2.7 or 3.4+. It is multi-platform and the goal is to make it work equally well
Poetry requires Python 2.7 or 3.5+. It is multi-platform and the goal is to make it work equally well
on Windows, Linux and OSX.

!!! note

Python 2.7 and 3.5 will no longer be supported in the next feature release (1.2).
You should consider updating your Python version to a supported one.


## Installation

Expand Down
16 changes: 11 additions & 5 deletions docs/docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,22 @@ If you publish you package on PyPI, they will appear in the `Project Links` sect
[PEP-517](https://www.python.org/dev/peps/pep-0517/) introduces a standard way
to define alternative build systems to build a Python project.

Poetry is compliant with PEP-517 so if you use Poetry to manage your Python
project you should reference it in the `build-system` section of the `pyproject.toml`
file like so:
Poetry is compliant with PEP-517, by providing a lightweight core library,
so if you use Poetry to manage your Python project you should reference
it in the `build-system` section of the `pyproject.toml` file like so:

```toml
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
```

!!!note

When using the `new` or `init` command this section will be automatically added.


!!!note

If your `pyproject.toml` file still references `poetry` directly as a build backend,
you should update it to reference `poetry_core` instead.
Loading

0 comments on commit be09d9c

Please sign in to comment.