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

CI: Validate on Python 3.6+ #546

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
41 changes: 37 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,57 @@ jobs:
fail-fast: false
matrix:
os: [
"ubuntu-latest",
"ubuntu-20.04",
"macos-12",
"macos-latest",
"windows-latest",
]
python-version: [
"3.6",
"3.7",
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"pypy3.10",
]

exclude:

# Exclude test matrix slots that are no longer supported by GHA runners.
- os: 'macos-latest'
python-version: '3.6'
- os: 'macos-latest'
python-version: '3.7'

# Exclude Python 3.7 on Windows, because GHA fails on it.
#
# SyntaxError: Non-UTF-8 code starting with '\x83' in file
# C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts\poe.exe
# on line 2, but no encoding declared;
# see http://python.org/dev/peps/pep-0263/ for details
#
# https://github.com/kennethreitz/responder/actions/runs/11526258626/job/32090071392?pr=546#step:6:73
- os: 'windows-latest'
python-version: '3.7'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: yezz123/setup-uv@v4
- run: uv pip install --editable '.[graphql,develop,test]' --system
- run: poe check

- name: Install package and run software tests (Python 3.6)
if: matrix.python-version == '3.6'
run: |
pip install '.[graphql,develop,test]'
poe test

- name: Install and completely validate package (Python >=3.6)
if: matrix.python-version != '3.6'
run: |
uv pip install '.[graphql,develop,test]' --system
poe check
14 changes: 11 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"aiofiles",
"apispec>=1.0.0b1",
"chardet",
"docopt-ng",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason why we are removing docopt-ng? I know its being used in the cli.py file.

Copy link
Collaborator Author

@amotl amotl Oct 25, 2024

Choose a reason for hiding this comment

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

cli.py did not exist in this project as I arrived. I asked Kenneth about it, but it seemed he also didn't know. Maybe it fell victim of the reverts he was doing to the code base the other day?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this spirit, the dependency can be re-added when we re-add cli.py again. Maybe we can find it back in some previous commits or PRs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe we can find it back?

Here we go:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let's have a dedicated issue to track this regression.

"marshmallow",
"requests",
"requests-toolbelt",
Expand Down Expand Up @@ -76,11 +75,16 @@ def run(self):
url="https://github.com/kennethreitz/responder",
packages=find_packages(exclude=["tests"]),
package_data={},
python_requires=">=3.10",
python_requires=">=3.6",
setup_requires=[],
install_requires=required,
extras_require={
"develop": ["poethepoet", "pyproject-fmt", "ruff", "validate-pyproject"],
"develop": [
"poethepoet",
"pyproject-fmt; python_version>='3.7'",
"ruff; python_version>='3.7'",
"validate-pyproject",
],
"graphql": ["graphene"],
"release": ["build", "twine"],
"test": ["pytest", "pytest-cov", "pytest-mock", "flask"],
Expand All @@ -95,6 +99,10 @@ def run(self):
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down
Loading