Skip to content

Commit

Permalink
Drop Python 3.7 support (#1306)
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed May 4, 2024
2 parents 04de218 + 4ec8ab9 commit ddc8490
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

* Add initial integration with OSS-Fuzz for continuous fuzz testing and first fuzzing test (David Lakin, #1302)

* Drop Python 3.7 support. (Jelmer Vernooij)

0.22.1 2024-04-23

* Handle alternate case for worktreeconfig setting (Will Shanks, #1285)
Expand Down
6 changes: 1 addition & 5 deletions dulwich/object_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,13 @@
Iterator,
List,
Optional,
Protocol,
Sequence,
Set,
Tuple,
cast,
)

try:
from typing import Protocol
except ImportError: # python << 3.8
from typing_extensions import Protocol # type: ignore

from .errors import NotTreeError
from .file import GitFile
from .objects import (
Expand Down
17 changes: 6 additions & 11 deletions dulwich/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@
import os
import struct
import sys
import warnings
import zlib
from hashlib import sha1
from itertools import chain
from os import SEEK_CUR, SEEK_END
from struct import unpack_from
from typing import (
BinaryIO,
Callable,
Expand All @@ -56,24 +61,14 @@
Iterator,
List,
Optional,
Protocol,
Sequence,
Set,
Tuple,
TypeVar,
Union,
)

try:
from typing import Protocol
except ImportError: # python << 3.8
from typing_extensions import Protocol # type: ignore

import warnings
import zlib
from hashlib import sha1
from os import SEEK_CUR, SEEK_END
from struct import unpack_from

try:
import mmap
except ImportError:
Expand Down
11 changes: 3 additions & 8 deletions dulwich/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,13 @@
import collections
import os
import socket
import socketserver
import sys
import time
import zlib
from functools import partial
from typing import Dict, Iterable, List, Optional, Set, Tuple, cast

try:
from typing import Protocol as TypingProtocol
except ImportError: # python < 3.8
from typing_extensions import Protocol as TypingProtocol # type: ignore

import socketserver
import zlib
from typing import Protocol as TypingProtocol

from dulwich import log_utils

Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ keywords = ["vcs", "git"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -24,10 +23,9 @@ classifiers = [
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Version Control",
]
requires-python = ">=3.7"
requires-python = ">=3.8"
dependencies = [
"urllib3>=1.25",
'typing_extensions;python_version<="3.7"',
'setuptools ; python_version >= "3.12"',
]
dynamic = ["version"]
Expand Down

0 comments on commit ddc8490

Please sign in to comment.