Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop python 3.4, prep for adding types #1188

Merged
merged 7 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ nbproject
/.vscode/
.idea/
.cache/
.mypy_cache/
.pytest_cache/
monkeytype.sqlite3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions doc/source/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
======
Expand Down
2 changes: 1 addition & 1 deletion doc/source/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Empty file added git/py.typed
Empty file.
6 changes: 6 additions & 0 deletions git/types.py
Original file line number Diff line number Diff line change
@@ -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]']
4 changes: 4 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

[mypy]

disallow_untyped_defs = True
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ def build_py_modules(basedir, excludes=[]):
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,
Expand All @@ -122,7 +123,6 @@ def build_py_modules(basedir, excludes=[]):
"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",
Expand Down
7 changes: 7 additions & 0 deletions test/tstrunner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import unittest
loader = unittest.TestLoader()
start_dir = '.'
suite = loader.discover(start_dir)

runner = unittest.TextTestRunner()
runner.run(suite)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -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}
Expand Down