Skip to content

Commit

Permalink
fix for poetry 1.5.0; drop support for older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jvllmr committed May 26, 2023
1 parent 0a97e64 commit 126ebdc
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 112 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: true
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
poetry-version: [1.2.2, 1.3.2, 1.4.2, 1.5.0]
poetry-version: [1.5.0]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
fail-fast: true
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
poetry-version: [1.2.2, 1.3.2, 1.4.2, 1.5.0]
poetry-version: [1.5.0]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["charliermarsh.ruff"]
}
9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"python.formatting.provider": "black",
"python.formatting.provider": "none",
"editor.formatOnSave": true,
"python.languageServer": "Pylance",
"python.linting.flake8CategorySeverity.E": "Warning",
"python.linting.flake8CategorySeverity.F": "Warning",
"python.linting.flake8Enabled": true,
"python.linting.flake8Enabled": false,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.defaultInterpreterPath": ".venv/bin/python"
"python.defaultInterpreterPath": ".venv/bin/python",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
}
168 changes: 67 additions & 101 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion poetry_types/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def remove_packages(self, packages: list[str], prepare_only=False):
def installer_action(self, packages: list[str]):
self.poetry.set_locker(
self.poetry.locker.__class__(
self.poetry.locker.lock.absolute().as_posix(),
self.poetry.locker.lock,
self.pyproject_poetry_content(),
)
)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ classifiers = [

[tool.poetry.dependencies]
python = "^3.7"
poetry = "^1.2"
poetry-core = "<1.6.0"
poetry = "^1.5"
tomlkit = "^0.11.4"
packaging = ">=21.3,<24.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.0"
tox = "^3.0 ||^4.0"
black = "^22.6.0 || ^23.0.0"
ruff = "^0.0.270"

[tool.pyaphid]
forbidden = ["print"]
Expand Down
3 changes: 1 addition & 2 deletions tests/pyproject.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ classifiers=[

[tool.poetry.dependencies]
python = "^3.7"
poetry = "^1.2"
poetry-core = "<1.6.0"
poetry = "^1.5"
colorama = "^0.4.4"

[tool.poetry.group.dev.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_remove(command: list[str], toml_file: CustomTOMLFile):
== 0
)

subprocess.run(["python", "-m", "poetry", "--verbose", *command])
subprocess.run(["python", "-m", "poetry", "-vvv", *command])
assert "types-colorama" not in toml_file.poetry["group"]["types"]["dependencies"]
assert "xlsxwriter" in toml_file.poetry["group"]["types"]["dependencies"]

Expand Down

0 comments on commit 126ebdc

Please sign in to comment.