Skip to content

Commit 2d6ff01

Browse files
Merge pull request #1068 from GitGuardian/jgriffe/remove-python-3.8-support
chore: remove support for python 3.8
2 parents 9077237 + fc93b1a commit 2d6ff01

File tree

13 files changed

+842
-995
lines changed

13 files changed

+842
-995
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
fail-fast: false
8080
matrix:
8181
os: [ubuntu-22.04, macos-13, windows-2022]
82-
python-version: ['3.8', '3.9', '3.10', '3.11']
82+
python-version: ['3.9', '3.10', '3.11']
8383
steps:
8484
- uses: actions/checkout@v4
8585
with:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Removed
2+
3+
- Removed support for python 3.8

doc/dev/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Run `make lint` to run all configured linters at once.
7171

7272
## Python version
7373

74-
We're committed to support Python 3.8+ for now.
74+
We're committed to support Python 3.9+ for now.
7575

7676
## Opening a pull request
7777

doc/pre-receive.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
# ggshield as a pre-commit hook
33
# Requirements:
4-
# python >= 3.8, pip
4+
# python >= 3.9, pip
55
# Installation instructions:
66
# Run: pip install ggshield
77
# Move `pre-receive.sample` to `.git/hooks/pre-receive`

ggshield/__main__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,6 @@ def _set_color(ctx: click.Context):
137137
def _display_deprecation_message(cfg: Config) -> None:
138138
for message in cfg.user_config.deprecation_messages:
139139
ui.display_warning(message)
140-
if sys.version_info < (3, 9):
141-
ui.display_warning(
142-
"Python 3.8 is no longer supported by the Python Software Foundation. "
143-
"GGShield will soon require Python 3.9 or above to run."
144-
)
145140

146141

147142
def _check_for_updates(check_for_updates: bool) -> None:

pdm.lock

Lines changed: 834 additions & 944 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,12 @@ classifiers = [
2727
"Programming Language :: Python :: 3",
2828
"Programming Language :: Python :: 3.10",
2929
"Programming Language :: Python :: 3.11",
30-
"Programming Language :: Python :: 3.8",
3130
"Programming Language :: Python :: 3.9",
3231
"Operating System :: OS Independent",
3332
"Topic :: Security",
3433
]
3534
license = {text = "MIT"}
36-
requires-python = ">=3.8.1"
35+
requires-python = ">=3.9"
3736
dependencies = [
3837
"platformdirs~=3.0.0",
3938
"charset-normalizer~=3.1.0",

scripts/create-ghe-environment

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ PROGNAME=$(basename "$0")
66
ROOT_DIR=$(cd "$(dirname "$0")/.." ; pwd)
77

88
declare -A DISTRIB_FOR_GHE_VERSION
9-
DISTRIB_FOR_GHE_VERSION["3.8"]="buster"
109
DISTRIB_FOR_GHE_VERSION["3.9"]="buster"
1110
DISTRIB_FOR_GHE_VERSION["3.10"]="buster"
1211
DISTRIB_FOR_GHE_VERSION["3.11"]="bookworm"

tests/unit/cmd/auth/test_login.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import json
2-
import sys
32
import urllib.parse as urlparse
43
from datetime import datetime, timedelta, timezone
54
from enum import IntEnum, auto
@@ -602,12 +601,6 @@ def test_valid_process(
602601
'You do not need to run "ggshield auth login" again. Future requests will automatically use the token.\n'
603602
)
604603

605-
if sys.version_info < (3, 9):
606-
message += (
607-
"Warning: Python 3.8 is no longer supported by the Python Software Foundation. "
608-
"GGShield will soon require Python 3.9 or above to run.\n"
609-
)
610-
611604
assert output.endswith(message)
612605

613606
self._assert_config("mysupertoken")
@@ -804,11 +797,6 @@ def _assert_last_print(output: str, expected_str: str):
804797
"""
805798
assert that the last log output is the same as the one passed in param
806799
"""
807-
if sys.version_info < (3, 9) and "Error:" not in expected_str:
808-
expected_str += (
809-
"Warning: Python 3.8 is no longer supported by the Python Software Foundation. "
810-
"GGShield will soon require Python 3.9 or above to run.\n"
811-
)
812800
assert output.endswith(expected_str)
813801

814802
def _assert_open_url(
@@ -938,11 +926,6 @@ def test_bad_sso_url(
938926
exit_code, output = self.run_cmd(cli_fs_runner, method=method)
939927
assert exit_code > 0, output
940928
self._webbrowser_open_mock.assert_not_called()
941-
if sys.version_info < (3, 9) and "Error:" not in expected_error:
942-
expected_error += (
943-
"Warning: Python 3.8 is no longer supported by the Python Software Foundation. "
944-
"GGShield will soon require Python 3.9 or above to run.\n"
945-
)
946929
self._assert_last_print(output, expected_error)
947930

948931
@pytest.mark.parametrize(

tests/unit/cmd/auth/test_logout.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
from typing import Optional, Tuple
32
from unittest.mock import Mock
43

@@ -82,12 +81,6 @@ def test_valid_logout(self, revoke, instance_url, monkeypatch, cli_fs_runner):
8281
"from your configuration.\n"
8382
)
8483

85-
if sys.version_info < (3, 9):
86-
expected_output += (
87-
"Warning: Python 3.8 is no longer supported by the Python Software Foundation. "
88-
"GGShield will soon require Python 3.9 or above to run.\n"
89-
)
90-
9184
assert output == expected_output
9285

9386
def test_logout_revoke_timeout(self, monkeypatch, cli_fs_runner):

0 commit comments

Comments
 (0)