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

Fix: Support Python 3.12 #6

Merged
merged 7 commits into from
Feb 28, 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
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Report a bug in Apyrat
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. Linux]
- Version [e.g. 1.0.0]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest or encourage the addition of a new feature to Apyrat
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
50 changes: 38 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,47 @@ on:
branches: [master]

jobs:
tests:
test-p36-p37:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- 3.6
- 3.7
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: pip install tox tox-gh-actions
- name: Test with tox
run: tox

test-p38-latest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.8
- 3.9
- "3.10"
- 3.11
- 3.12
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: "pip"
cache-dependency-path: requirements_dev.txt
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: pip install -r requirements_dev.txt
- name: Static code analysis
run: make lint
- name: Python unit tests
run: make test
run: pip install tox tox-gh-actions
- name: Test with tox
run: tox
11 changes: 11 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
black==21.7b0
click==7.1.2
coverage==4.5.4
flake8
pytest==6.2.4
requests==2.31.0
sphinx==1.8.5
tox==3.14.0
twine
wget==3.2
wheel
13 changes: 0 additions & 13 deletions requirements_dev.txt

This file was deleted.

1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
description="An Aparat video downloader. simple, but elegant.",
entry_points={
Expand Down
29 changes: 12 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
[tox]
envlist = py36, py37, py38, py39, py310, py311, flake8
envlist = py{38,39,310,311,312}, flake8

[travis]
[gh-actions]
python =
3.11: py311
3.10: py310
3.9: py39
3.8: py38
3.7: py37
3.6: py36

[testenv:flake8]
basepython = python
deps = flake8
commands = flake8 apyrat tests
3.12: py312, flake8
3.11: py311, flake8
3.10: py310, flake8
3.9: py39, flake8
3.8: py38, flake8

[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
; If you want to make tox run the tests with the same versions, create a
; requirements.txt with the pinned versions and uncomment the following line:
; -r{toxinidir}/requirements.txt
-r{toxinidir}/requirements.txt
commands =
pip install -U pip
pytest --basetemp={envtmpdir}

[testenv:flake8]
skip_install = True
deps = flake8
commands = flake8 apyrat tests
Loading