Skip to content

Commit

Permalink
Deprecate Python 3.7 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvervloesem committed Jun 29, 2023
1 parent b8742d5 commit 878cb77
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ jobs:
fail-fast: false
matrix:
python:
- "3.7" # oldest Python supported by PSF
- "3.8"
- "3.8" # oldest Python supported by PSF
- "3.9"
- "3.10"
- "3.11" # newest Python that is stable
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ package:
tox -r -e docs

#. Make sure to have a reliable |tox|_ installation that uses the correct
Python version (e.g., 3.7+). When in doubt you can run::
Python version (e.g., 3.8+). When in doubt you can run::

tox --version
# OR
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ ignore = [
"FBT", # flake8-boolean-trap
"T20", # flake8-print
]
# Always generate Python 3.7-compatible code
target-version = "py37"
# Always generate Python 3.8-compatible code
target-version = "py38"

src = ["src", "test"]

Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -55,15 +54,14 @@ include_package_data = True
package_dir =
=src

python_requires = >=3.7
python_requires = >=3.8

# Add here dependencies of your project (line-separated), e.g. requests>=2.2,<3.0.
# Version specifiers like >=2.2,<3.0 avoid problems due to API changes in
# new major versions. This works if the required packages follow Semantic Versioning.
# For more information, check out https://semver.org/.
install_requires =
bleak>=0.19.0
importlib-metadata; python_version<"3.8"


[options.packages.find]
Expand Down
7 changes: 1 addition & 6 deletions src/bluetooth_clocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from __future__ import annotations

import logging
import sys
from abc import ABC, abstractmethod
from importlib import import_module
from importlib.metadata import PackageNotFoundError, version # pragma: no cover
from inspect import isclass
from pathlib import Path
from pkgutil import iter_modules
Expand All @@ -26,11 +26,6 @@

from bluetooth_clocks.exceptions import TimeNotReadableError, UnsupportedDeviceError

if sys.version_info[:2] >= (3, 8):
from importlib.metadata import PackageNotFoundError, version # pragma: no cover
else:
from importlib_metadata import PackageNotFoundError, version # pragma: no cover

try:
# Change here if project is renamed and does not equal the package name
dist_name = "bluetooth-clocks"
Expand Down

0 comments on commit 878cb77

Please sign in to comment.