Browse Source

drop compatibility with python3.6

https://github.com/fphammerle/ical2vdir/commit/2b32144312b59398a91d4814ea1d3981076b3238
https://github.com/fphammerle/acpi-backlight/commit/6bcb9e76e45fc9564ad78feb8d211e6ac950bc65
Fabian Peter Hammerle 2 years ago
parent
commit
296016cc42
5 changed files with 11 additions and 8 deletions
  1. 0 1
      .github/workflows/python.yml
  2. 1 1
      CHANGELOG.md
  3. 3 1
      cc1101/__init__.py
  4. 3 1
      cc1101/_gpio.py
  5. 4 4
      setup.py

+ 0 - 1
.github/workflows/python.yml

@@ -34,7 +34,6 @@ jobs:
     strategy:
       matrix:
         python-version:
-        - '3.6'
         - '3.7'
         - '3.8'
         - '3.9'

+ 1 - 1
CHANGELOG.md

@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 ### Removed
-- compatibility with `python3.5`
+- compatibility with `python3.5` & `python3.6`
 
 ## [2.7.3] - 2021-04-20
 ### Fixed

+ 3 - 1
cc1101/__init__.py

@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+from __future__ import annotations
+
 import contextlib
 import datetime
 import enum
@@ -541,7 +543,7 @@ class CC1101:
             [GDOSignalSelection.RX_FIFO_AT_OR_ABOVE_THRESHOLD_OR_PACKET_END_REACHED],
         )
 
-    def __enter__(self) -> "CC1101":
+    def __enter__(self) -> CC1101:
         # https://docs.python.org/3/reference/datamodel.html#object.__enter__
         try:
             self._spi.open(self._spi_bus, self._spi_chip_select)

+ 3 - 1
cc1101/_gpio.py

@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+from __future__ import annotations
+
 import ctypes
 import ctypes.util
 import datetime
@@ -57,7 +59,7 @@ class GPIOLine:
         self._pointer = pointer
 
     @classmethod
-    def find(cls, name: bytes) -> "GPIOLine":
+    def find(cls, name: bytes) -> GPIOLine:
         # > If this routine succeeds, the user must manually close the GPIO chip
         # > owning this line to avoid memory leaks.
         pointer: int = _load_libgpiod().gpiod_line_find(name)

+ 4 - 4
setup.py

@@ -45,12 +45,11 @@ setuptools.setup(
     ],
     classifiers=[
         # https://pypi.org/classifiers/
-        "Development Status :: 3 - Alpha",
+        "Development Status :: 4 - Beta",
         "Intended Audience :: Developers",
         "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
         "Operating System :: POSIX :: Linux",
         # .github/workflows/python.yml
-        "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
@@ -64,8 +63,9 @@ setuptools.setup(
             "cc1101-transmit = cc1101._cli:_transmit",
         ]
     },
-    # f-strings, variable type hints, force kwargs with *
-    python_requires=">=3.6",
+    # >=3.6 f-strings, variable type hints, force kwargs with *
+    # >=3.7 postponed evaluation of type annotations (PEP563)
+    python_requires=">=3.7",
     install_requires=[
         # apt install python3-spidev
         # https://github.com/doceme/py-spidev