8000 Merge pull request #1541 from hugovk/add-3.11 · CoderboticsAI/GitPython@f594266 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f594266

Browse files
authored
Merge pull request gitpython-developers#1541 from hugovk/add-3.11
Declare support for Python 3.11
2 parents 3901d4c + 8a80474 commit f594266

File tree

7 files changed

+44
-30
lines changed

7 files changed

+44
-30
lines changed

.github/workflows/cygwin-test.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
name: test-cygwin
22

3-
on:
4-
push:
5-
branches:
6-
main
7-
pull_request:
8-
branches:
9-
main
3+
on: [push, pull_request, workflow_dispatch]
104

115
jobs:
126
build:
137
runs-on: windows-latest
8+
strategy:
9+
fail-fast: false
1410
env:
1511
CHERE_INVOKING: 1
1612
SHELLOPTS: igncr
@@ -47,11 +43,6 @@ jobs:
4743
# If we rewrite the user's config by accident, we will mess it up
4844
# and cause subsequent tests to fail
4945
cat test/fixtures/.gitconfig >> ~/.gitconfig
50-
- name: Lint with flake8
51-
shell: bash.exe -eo pipefail -o igncr "{0}"
52-
run: |
53-
set -x
54-
/usr/bin/python -m flake8
5546
- name: Test with pytest
5647
shell: bash.exe -eo pipefail -o igncr "{0}"
5748
run: |

.github/workflows/lint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-python@v4
12+
with:
13+
python-version: "3.x"
14+
- uses: pre-commit/action@v3.0.0

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
name: Python package
55

6-
on:
7-
push:
8-
branches: [ main ]
9-
pull_request:
10-
branches: [ main ]
6+
on: [push, pull_request, workflow_dispatch]
117

128
permissions:
139
contents: read
@@ -17,6 +13,7 @@ jobs:
1713

1814
runs-on: ubuntu-latest
1915
strategy:
16+
fail-fast: false
2017
matrix:
2118
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
2219

@@ -47,11 +44,6 @@ jobs:
4744
# and cause subsequent tests to fail
4845
cat test/fixtures/.gitconfig >> ~/.gitconfig
4946
50-
- name: Lint with flake8
51-
run: |
52-
set -x
53-
flake8
54-
5547
- name: Check types with mypy
5648
# With new versions of pypi new issues might arise. This is a problem if there is nobody able to fix them,
5749
# so we have to ignore errors until that changes.

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
repos:
2+
- repo: https://github.com/PyCQA/flake8
3+
rev: 6.0.0
4+
hooks:
5+
- id: flake8
6+
additional_dependencies:
7+
[
8+
flake8-bugbear==22.12.6,
9+
flake8-comprehensions==3.10.1,
10+
flake8-typing-imports==1.14.0,
11+
]
12+
exclude: ^doc|^git/ext/|^test/
13+
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v4.4.0
16+
hooks:
17+
- id: check-merge-conflict
18+
- id: check-toml
19+
- id: check-yaml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ with MINGW's.
107107
Ensure testing libraries are installed.
108108
In the root directory, run: `pip install -r test-requirements.txt`
109109

110-
To lint, run: `flake8`
110+
To lint, run: `pre-commit run --all-files`
111111

112112
To typecheck, run: `mypy -p git`
113113

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def make_release_tree(self, base_dir: str, files: Sequence) -> None:
4444
def _stamp_version(filename: str) -> None:
4545
found, out = False, []
4646
try:
47-
with open(filename, "r") as f:
47+
with open(filename) as f:
4848
for line in f:
4949
if "__version__ =" in line:
5050
line = line.replace("\"git\"", "'%s'" % VERSION)
@@ -82,7 +82,7 @@ def build_py_modules(basedir: str, excludes: Sequence = ()) -> Sequence:
8282
name="GitPython",
8383
cmdclass={"build_py": build_py, "sdist": sdist},
8484
version=VERSION,
85-
description="""GitPython is a python library used to interact with Git repositories""",
85+
description="GitPython is a Python library used to interact with Git repositories",
8686
author="Sebastian Thiel, Michael Trier",
8787
author_email="byronimo@gmail.com, mtrier@gmail.com",
8888
license="BSD",
@@ -95,7 +95,7 @@ def build_py_modules(basedir: str, excludes: Sequence = ()) -> Sequence:
9595
install_requires=requirements,
9696
tests_require=requirements + test_requirements,
9797
zip_safe=False,
98-
long_description="""GitPython is a python library used to interact with Git repositories""",
98+
long_description="""GitPython is a Python library used to interact with Git repositories""",
9999
long_description_content_type="text/markdown",
100100
classifiers=[
101101
# Picked from
@@ -121,5 +121,6 @@ def build_py_modules(basedir: str, excludes: Sequence = ()) -> Sequence:
121121
"Programming Language :: Python :: 3.8",
122122
"Programming Language :: Python :: 3.9",
123123
"Programming Language :: Python :: 3.10",
124+
"Programming Language :: Python :: 3.11",
124125
],
125126
)

test-requirements.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ mypy
33

44
black
55

6-
flake8
7-
flake8-bugbear
8-
flake8-comprehensions
9-
flake8-typing-imports
6+
pre-commit
107

118
virtualenv
129

0 commit comments

Comments
 (0)
0