diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | doc/source/changes.rst | 1 | ||||
-rw-r--r-- | doc/source/intro.rst | 2 | ||||
-rw-r--r-- | git/py.typed | 0 | ||||
-rw-r--r-- | git/types.py | 6 | ||||
-rw-r--r-- | mypy.ini | 4 | ||||
-rwxr-xr-x | setup.py | 4 | ||||
-rw-r--r-- | test/tstrunner.py | 7 | ||||
-rw-r--r-- | tox.ini | 2 |
10 files changed, 26 insertions, 5 deletions
@@ -18,3 +18,6 @@ nbproject /.vscode/ .idea/ .cache/ +.mypy_cache/ +.pytest_cache/ +monkeytype.sqlite3 @@ -34,7 +34,7 @@ If it is not in your `PATH`, you can help GitPython find it by setting the `GIT_PYTHON_GIT_EXECUTABLE=<path/to/git>` environment variable. * Git (1.7.x or newer) -* Python >= 3.4 +* Python >= 3.5 The list of dependencies are listed in `./requirements.txt` and `./test-requirements.txt`. The installer takes care of installing them for you. diff --git a/doc/source/changes.rst b/doc/source/changes.rst index b9c27b28..85f9ef1b 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -8,6 +8,7 @@ Changelog * git.Commit objects now have a ``replace`` method that will return a copy of the commit with modified attributes. * Add python 3.9 support +* Drop python 3.4 support 3.1.13 ====== diff --git a/doc/source/intro.rst b/doc/source/intro.rst index 638a9166..7168c91b 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -13,7 +13,7 @@ The object database implementation is optimized for handling large quantities of Requirements ============ -* `Python`_ >= 3.4 +* `Python`_ >= 3.5 * `Git`_ 1.7.0 or newer It should also work with older versions, but it may be that some operations involving remotes will not work as expected. diff --git a/git/py.typed b/git/py.typed new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/git/py.typed diff --git a/git/types.py b/git/types.py new file mode 100644 index 00000000..dc44c123 --- /dev/null +++ b/git/types.py @@ -0,0 +1,6 @@ +import os # @UnusedImport ## not really unused, is in type string +from typing import Union, Any + + +TBD = Any +PathLike = Union[str, 'os.PathLike[str]'] diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 00000000..349266b7 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,4 @@ + +[mypy] + +disallow_untyped_defs = True @@ -95,10 +95,11 @@ setup( license="BSD", url="https://github.com/gitpython-developers/GitPython", packages=find_packages(exclude=("test.*")), + package_data={'git': ['**/*.pyi', 'py.typed']}, include_package_data=True, py_modules=build_py_modules("./git", excludes=["git.ext.*"]), package_dir={'git': 'git'}, - python_requires='>=3.4', + python_requires='>=3.5', install_requires=requirements, tests_require=requirements + test_requirements, zip_safe=False, @@ -122,7 +123,6 @@ setup( "Operating System :: MacOS :: MacOS X", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", diff --git a/test/tstrunner.py b/test/tstrunner.py new file mode 100644 index 00000000..a3bcfa3c --- /dev/null +++ b/test/tstrunner.py @@ -0,0 +1,7 @@ +import unittest +loader = unittest.TestLoader() +start_dir = '.' +suite = loader.discover(start_dir) + +runner = unittest.TextTestRunner() +runner.run(suite) @@ -1,5 +1,5 @@ [tox] -envlist = py34,py35,py36,py37,py38,py39,flake8 +envlist = py35,py36,py37,py38,py39,flake8 [testenv] commands = python -m unittest --buffer {posargs} |