From 160be6f0c9db4f0d47e78d37ad10b87c9a95280c Mon Sep 17 00:00:00 2001 From: konstantin Date: Thu, 8 Sep 2022 16:17:42 +0200 Subject: [PATCH] Make Package available to Python 3.9 (#6) --- .github/workflows/unittests.yml | 2 +- setup.cfg | 2 +- src/edi_energy_scraper/__init__.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 20d92da..ccf5ac5 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -6,7 +6,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.10"] + python-version: ["3.9", "3.10"] os: [ubuntu-latest] steps: - uses: actions/checkout@v2 diff --git a/setup.cfg b/setup.cfg index 34351f2..06baff1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,7 @@ package_dir = packages = find: zip_safe = False include_package_data = True -python_requires = >=3.10 +python_requires = >=3.9 install_requires = beautifulsoup4 requests diff --git a/src/edi_energy_scraper/__init__.py b/src/edi_energy_scraper/__init__.py index 2ad5375..b636462 100644 --- a/src/edi_energy_scraper/__init__.py +++ b/src/edi_energy_scraper/__init__.py @@ -10,7 +10,7 @@ from pathlib import Path from random import randint from time import sleep -from typing import Callable, Dict, Set +from typing import Callable, Dict, Set, Union import requests from bs4 import BeautifulSoup, Comment # type:ignore[import] @@ -38,7 +38,7 @@ class EdiEnergyScraper: def __init__( self, root_url: str = "https://www.edi-energy.de", - path_to_mirror_directory: Path | str = Path("edi_energy_de"), + path_to_mirror_directory: Union[Path, str] = Path("edi_energy_de"), # HTML and PDF files will be stored relative to this dos_waiter: Callable = lambda: sleep(randint(1, 10)), ):