Skip to content

Commit 9023afa

Browse files
committed
Universal 3.8 support
1 parent d379009 commit 9023afa

File tree

13 files changed

+53
-54
lines changed

13 files changed

+53
-54
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 ./setup_build_env_do_not_run/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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ docs/common/reference
1818
daf_web_data
1919
test.py
2020

21-
venv/*
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]

README.rst

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

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

3737
**Main package**
3838

docs/source/index.rst

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

5757
.. tab-item:: Main package
5858

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

6161
.. code-block:: bash
6262

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: 2 additions & 2 deletions
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
@@ -276,7 +276,7 @@ async def initialize(self):
276276
self.tasks.append(asyncio.create_task(self._loop()))
277277
self._running = True
278278

279-
def generate_log_context(self) -> dict[str, Union[str, int]]:
279+
def generate_log_context(self) -> Dict[str, Union[str, int]]:
280280
"""
281281
Generates a dictionary of the user's context,
282282
which is then used for logging.

src/daf/guild.py

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

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

0 commit comments

Comments
 (0)