Skip to content

Commit

Permalink
drop support for python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Mar 18, 2023
1 parent cbfdc62 commit 584801e
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 109 deletions.
1 change: 0 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ test_task:
# avoid failures on tests that depend on it.
SHELL: sh
matrix:
- PYTHON: python3.7
- PYTHON: python3.8
- PYTHON: python3.9
- PYTHON: python3.10
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
min_python_version = 3.7.0
min_python_version = 3.8.0
max-line-length = 88
ban-relative-imports = true
# flake8-use-fstring: https://github.com/MichaelKim0407/flake8-use-fstring#--percent-greedy-and---format-greedy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- os: Ubuntu
image: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
strategy:
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- run: exit 0
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]
exclude: ^(install|get)-poetry.py$

- repo: https://github.com/hadialqattan/pycln
Expand Down
2 changes: 1 addition & 1 deletion docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Poetry offers a lockfile to ensure repeatable installs, and can build your proje

## System requirements

Poetry requires **Python 3.7+**. It is multi-platform and the goal is to make it work equally well
Poetry requires **Python 3.8+**. It is multi-platform and the goal is to make it work equally well
on Linux, macOS and Windows.

## Installation
Expand Down
70 changes: 3 additions & 67 deletions poetry.lock

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

15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ generate-setup-file = false

# Requirements
[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"

poetry-core = "1.5.2"
poetry-plugin-export = "^1.3.0"
"backports.cached-property" = { version = "^1.0.2", python = "<3.8" }
build = "^0.10.0"
cachecontrol = { version = "^0.12.9", extras = ["filecache"] }
cleo = "^2.0.0"
Expand Down Expand Up @@ -103,14 +102,12 @@ pytest-cov = "^4.0"
pytest-mock = "^3.9"
pytest-randomly = "^3.12"
pytest-xdist = { version = "^3.1", extras = ["psutil"] }
zipp = { version = "^3.4", python = "<3.8" }

[tool.poetry.group.typing.dependencies]
mypy = ">=1.0"
types-html5lib = ">=1.1.9"
types-jsonschema = ">=4.9.0"
types-requests = ">=2.28.8"
typing-extensions = { version = "^4.0.0", python = "<3.8" }

# only used in github actions
[tool.poetry.group.github-actions]
Expand All @@ -129,7 +126,7 @@ build-backend = "poetry.core.masonry.api"


[tool.isort]
py_version = 37
py_version = 38
profile = "black"
force_single_line = true
combine_as_imports = true
Expand All @@ -141,7 +138,7 @@ known_third_party = ["poetry.core"]


[tool.black]
target-version = ['py37']
target-version = ['py38']
preview = true
force-exclude = '''
.*/setup\.py$
Expand All @@ -161,9 +158,9 @@ enable_error_code = [
"truthy-bool",
]

# use of importlib-metadata backport at python3.7 makes it impossible to
# satisfy mypy without some ignores: but we get a different set of ignores at
# different python versions.
# use of importlib-metadata backport makes it impossible to satisfy mypy
# without some ignores: but we get a different set of ignores at different
# python versions.
#
# <https://github.com/python/mypy/issues/8823>, meanwhile suppress that
# warning.
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/repositories/link_sources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import re

from functools import cached_property
from typing import TYPE_CHECKING
from typing import DefaultDict
from typing import List
Expand All @@ -11,7 +12,6 @@
from poetry.core.packages.package import Package
from poetry.core.version.exceptions import InvalidVersion

from poetry.utils._compat import cached_property
from poetry.utils.patterns import sdist_file_re
from poetry.utils.patterns import wheel_file_re

Expand Down
2 changes: 1 addition & 1 deletion src/poetry/repositories/link_sources/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import warnings

from collections import defaultdict
from functools import cached_property
from html import unescape
from typing import TYPE_CHECKING

from poetry.core.packages.utils.link import Link

from poetry.repositories.link_sources.base import LinkSource
from poetry.utils._compat import cached_property


if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/repositories/link_sources/json.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from __future__ import annotations

from collections import defaultdict
from functools import cached_property
from typing import TYPE_CHECKING
from typing import Any

from poetry.core.packages.utils.link import Link

from poetry.repositories.link_sources.base import LinkSource
from poetry.utils._compat import cached_property


if TYPE_CHECKING:
Expand Down
7 changes: 0 additions & 7 deletions src/poetry/utils/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
else:
from importlib import metadata

if sys.version_info < (3, 8):
# compatibility for python <3.8
from backports.cached_property import cached_property
else:
from functools import cached_property

WINDOWS = sys.platform == "win32"


Expand Down Expand Up @@ -62,7 +56,6 @@ def to_str(string: str) -> str:

__all__ = [
"WINDOWS",
"cached_property",
"decode",
"encode",
"metadata",
Expand Down
13 changes: 0 additions & 13 deletions tests/compat.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/plugins/test_plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from pathlib import Path
from typing import TYPE_CHECKING
from typing import Protocol

import pytest

Expand All @@ -13,7 +14,6 @@
from poetry.plugins import Plugin
from poetry.plugins.plugin_manager import PluginManager
from poetry.poetry import Poetry
from tests.compat import Protocol
from tests.helpers import mock_metadata_entry_points


Expand Down
3 changes: 2 additions & 1 deletion tests/repositories/test_installed_repository.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

import zipfile

from collections import namedtuple
from pathlib import Path
from typing import TYPE_CHECKING
Expand All @@ -9,7 +11,6 @@
from poetry.repositories.installed_repository import InstalledRepository
from poetry.utils._compat import metadata
from poetry.utils.env import MockEnv as BaseMockEnv
from tests.compat import zipfile


if TYPE_CHECKING:
Expand Down
Loading

0 comments on commit 584801e

Please sign in to comment.