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

Remove <4 Python version constraint #267

Merged
merged 6 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- master

env:
POETRY_VERSION: "1.3.0"
POETRY_VERSION: "1.4.2"

jobs:
cs:
Expand Down
10 changes: 5 additions & 5 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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ include = [
]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
python = ">=3.8"
Werkzeug = ">= 2.0.0"


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you remove this yaml file from your MR? I think removing python <4 constraint should not be visible to any users, or it should not cause any functionality change and I include only those to the changelog.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Done: 0ccebbd

- |
Remove the <4 python constraint.
10 changes: 5 additions & 5 deletions tests/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

NAME = "pytest-httpserver"
NAME_UNDERSCORE = NAME.replace("-", "_")
PY_MAX_VERSION = (3, 12)


@pytest.fixture(scope="session")
Expand Down Expand Up @@ -120,20 +121,20 @@ def test_python_version(build: Build, pyproject):
pyproject_meta = pyproject["tool"]["poetry"]
wheel_meta = build.wheel.get_meta(version=pyproject_meta["version"])
python_dependency = pyproject_meta["dependencies"]["python"]
m = re.match(r">=(\d+\.\d+),<(\d+\.\d+)", python_dependency)
m = re.match(r">=(\d+\.\d+)", python_dependency)
if m:
min_version, max_version = m.groups()
min_version, *_ = m.groups()
else:
raise ValueError(python_dependency)

min_version_tuple = version_to_tuple(min_version)
max_version_tuple = version_to_tuple(max_version)

for classifier in wheel_meta.get_all("Classifier"):
if classifier.startswith("Programming Language :: Python ::"):
version_tuple = version_to_tuple(classifier.split("::")[-1].strip())
if len(version_tuple) > 1:
assert version_tuple >= min_version_tuple and version_tuple < max_version_tuple
assert version_tuple >= min_version_tuple
csernazs marked this conversation as resolved.
Show resolved Hide resolved
assert version_tuple < PY_MAX_VERSION


def test_wheel_no_extra_contents(build: Build, version: str):
Expand Down Expand Up @@ -168,7 +169,6 @@ def test_sdist_contents(build: Build, version: str):
"pyproject.toml",
"pytest_httpserver",
"README.md",
"setup.py",
csernazs marked this conversation as resolved.
Show resolved Hide resolved
"tests",
},
"doc": {
Expand Down