Skip to content

Commit d873756

Browse files
committed
Universal 3.8 support
1 parent d378456 commit d873756

File tree

12 files changed

+27
-15
lines changed

12 files changed

+27
-15
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
min_python_version = 3.10
2+
min_python_version = 3.8
33

44
exclude = src/_discord
55

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v3
2323
- uses: actions/setup-python@v4
2424
with:
25-
python-version: '3.10'
25+
python-version: '3.8'
2626
- name: Install requirements
2727
run: |
2828
sh install.sh

.github/workflows/python-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
max-parallel: 1
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.10", "3.11"]
17+
python-version: ["3.8", "3.11"]
1818
steps:
1919
- uses: actions/checkout@v3
2020
- name: Set up Python ${{ matrix.python-version }}
@@ -35,13 +35,13 @@ jobs:
3535
- name: Test version compatibility
3636
env:
3737
DISCORD_TOKEN: ${{secrets.DATT}}
38-
if: ${{ matrix.python-version != 3.10 }}
38+
if: ${{ matrix.python-version != 3.8 }}
3939
run: |
4040
pytest -v testing/test_period_dynamic.py
4141
- name: Test all
4242
env:
4343
DISCORD_TOKEN: ${{secrets.DATT}}
44-
if: ${{ matrix.python-version == 3.10 }}
44+
if: ${{ matrix.python-version == 3.8 }}
4545
run: |
4646
pytest -v
4747

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ docs/common/reference
1616
**/DEP/**
1717

1818
daf_web_data
19-
test.py
19+
test.py
20+
21+
venv/*
22+
.venv/*

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ build:
1212
apt_packages:
1313
- inkscape
1414
tools:
15-
python: "3.10"
15+
python: "3.8"
1616
jobs:
1717
pre_build:
1818
- pip install .[all] .[docs]

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ DAF can be installed though command prompt/terminal using the bottom commands.
4747

4848
.. tab-item:: Main package
4949

50-
Pre-requirement: `Python (minimum v3.10) <https://www.python.org/downloads/>`_
50+
Pre-requirement: `Python (minimum v3.8) <https://www.python.org/downloads/>`_
5151

5252
.. code-block:: bash
5353

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ authors = [
1313
]
1414
description = "Framework for periodic advertisements on Discord"
1515
readme = "README.rst"
16-
requires-python = ">=3.10"
16+
requires-python = ">=3.8"
1717
keywords = ["Discord", "Advertising", "Framework", "NFT", "Shilling"]
1818
classifiers = [
1919
"Programming Language :: Python :: 3",

src/daf/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
This modules contains definitions related to the client (for API)
33
"""
4-
from typing import Optional, Union, List
4+
from typing import Optional, Union, List, Dict
55

66
from . import misc
77
from . import guild

src/daf/guild.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ async def _join_guilds(self):
868868

869869
try:
870870
# Get next result from top.gg
871-
yielded: web.QueryResult = await anext(self.guild_query_iter)
871+
yielded: web.QueryResult = await self.guild_query_iter.__anext__()
872872
if (
873873
re.search(self.include_pattern, yielded.name) is None or
874874
(

src/daf/logging/logging.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
This module is responsible for the logging in daf.
33
It contains all the logging classes.
44
"""
5-
from datetime import datetime
6-
from typing import Optional
5+
from datetime import datetime, date
6+
from typing import Optional, Literal, Union, Tuple, List
77

88
from .tracing import trace, TraceLEVELS
99
from .. import misc
@@ -23,7 +23,7 @@
2323

2424
# Constants
2525
# ---------------------#
26-
C_FILE_NAME_FORBIDDEN_CHAR = ('<','>','"','/','\\','|','?','*',":")
26+
C_FILE_NAME_FORBIDDEN_CHAR = ('<', '>', '"', '/', '\\', '|', '?', '*', ":")
2727

2828

2929
class GLOBAL:

0 commit comments

Comments
 (0)