Browse Source

test against python3.10

Fabian Peter Hammerle 2 years ago
parent
commit
c79bc34460
5 changed files with 11 additions and 2 deletions
  1. 1 0
      .github/workflows/python.yml
  2. 5 0
      Pipfile
  3. 2 1
      Pipfile.lock
  4. 2 1
      pubmed_bibtex/__init__.py
  5. 1 0
      setup.py

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

@@ -39,6 +39,7 @@ jobs:
         - '3.7'
         - '3.8'
         - '3.9'
+        - '3.10'
       fail-fast: false
     steps:
     - uses: actions/checkout@v2.4.0

+ 5 - 0
Pipfile

@@ -14,6 +14,11 @@ pylint-import-requirements = "*"
 pytest = "*"
 pytest-cov = "*"
 
+# python3.10 compatibility
+# >   File "[...]/lib/python3.10/site-packages/mypy/main.py", line 11, in <module>
+# >     from typing_extensions import Final, NoReturn
+# > ModuleNotFoundError: No module named 'typing_extensions'
+typing-extensions = "*"
 # mypy on python<3.8
 typed-ast = {markers = "python_version < '3.8'"}
 

+ 2 - 1
Pipfile.lock

@@ -1,7 +1,7 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "6b0871414658f1c42f53f89f5c63e9b12bae08555cd8d1bc18b466ddbfc6cbe9"
+            "sha256": "2329d01ca222a1f465abb135171d86d58882e19fa2c13221acc29f09b26dfff2"
         },
         "pipfile-spec": 6,
         "requires": {
@@ -325,6 +325,7 @@
                 "sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e",
                 "sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b"
             ],
+            "index": "pypi",
             "version": "==4.0.1"
         },
         "wrapt": {

+ 2 - 1
pubmed_bibtex/__init__.py

@@ -64,7 +64,8 @@ class _TeXMedHtmlParser(html.parser.HTMLParser):
         if "Author" in data:
             self.bibtex_entry = self._strip_bibtex_entry(data)
 
-    def error(self, message: str) -> None:
+    @staticmethod
+    def error(message: str) -> None:
         raise Exception(message)  # pragma: no cover
 
 

+ 1 - 0
setup.py

@@ -41,6 +41,7 @@ setuptools.setup(
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
         "Topic :: Scientific/Engineering :: Medical Science Apps.",
         "Topic :: Utilities",
     ],